A few minor changes
This commit is contained in:
parent
be577df2ec
commit
bc49620b23
@ -142,6 +142,9 @@ void main(void)
|
||||
int x = int(gl_FragCoord.x), y = int(gl_FragCoord.y);
|
||||
vec3 FragPos = getXcYcZc(x, y, lineardepth);
|
||||
|
||||
// Fallback
|
||||
vec3 fallback = .25 * SpecularIBL(normal, eyedir, specval);
|
||||
|
||||
// Better implementation: :::::::::::::::::::::::::::::::::::
|
||||
|
||||
float View_Depth = makeLinear(1000.0, 0.001, lineardepth);
|
||||
@ -161,8 +164,7 @@ void main(void)
|
||||
vec3 hitPos = View_Pos.xyz;
|
||||
float dDepth;
|
||||
float minRayStep = 100.0f;
|
||||
// Fallback
|
||||
vec3 fallback = .25 * SpecularIBL(normal, eyedir, specval);
|
||||
|
||||
vec3 outColor = RayCast(reflected * max(minRayStep, -View_Pos.z), hitPos, dDepth, dtex, fallback, 0.001);
|
||||
vec3 outColor2 = RayCast(reflected2 * max(minRayStep, -View_Pos.z), hitPos, dDepth, dtex, fallback, 0.001);
|
||||
outColor = mix(outColor, outColor2, 1.0 - specval);
|
||||
|
@ -28,7 +28,7 @@ void main()
|
||||
vec3 SpecularComponent = texture(specular_map, tc).xyz;
|
||||
|
||||
vec3 diffuse_color_for_mix = diffuseMatColor.xyz * 4.0;
|
||||
vec3 metallicMatColor = mix(vec3(0.2), diffuse_color_for_mix, metallicMapValue);
|
||||
vec3 metallicMatColor = mix(vec3(0.5), diffuse_color_for_mix, metallicMapValue);
|
||||
vec3 tmp = DiffuseComponent * mix(diffuseMatColor.xyz, vec3(0.0), metallicMapValue) + (metallicMatColor * SpecularComponent);
|
||||
|
||||
vec3 emitCol = diffuseMatColor.xyz + (diffuseMatColor.xyz * diffuseMatColor.xyz * emitMapValue * emitMapValue * 10.0);
|
||||
|
@ -39,7 +39,7 @@ void main(void)
|
||||
|
||||
o_normal_color.xy = 0.5 * EncodeNormal(normalize(normal)) + 0.5;
|
||||
o_normal_color.zw = layer_2.xy;
|
||||
//o_normal_color.z = 0;
|
||||
o_normal_color.z = 0.5;
|
||||
#else
|
||||
o_diffuse_color = vec4(final_color, 1.0);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user