Advertisement

different results when trying to change from makeNoise 3times into makeNoise 1time, but trouble when using DepthFBO, Thanks!

Started by July 22, 2024 11:29 PM
0 comments, last by gpu 1 month, 3 weeks ago
<pass1>:
float n1 = makeNoise(u, v);
float n2 = makeNoise(u+1.0/resolution.x, v);
float n3 = makeNoise(u, v+1.0/resolution.y);
out_FragColor.rgb = normalize(vec2(n1-n2, n1-n3), 1.0);
<pass2>:
vec3 ColorA = texture(pass1_outColor, u, v).rgb;
///////////////////////////////////////////////////////////
<pass1>:
float n1 = makeNoise(u, v);
out_FragDepth.r = n1;
<pass2>://Depth32F FBO
float n = texture(pass1_outDepth, uv).r;
float n2 = texture(pass1_outDepth, uv+vec2(1.0/resolution.x, 0.0)).r;
float n3 = texture(pass1_outDepth, uv+vec2(0.0, 1.0/resolution.y)).r;
vec3 ColorB = normalize(vec2(n-n2, n-n3), 1.0);

the above solutions got different result.


This topic is closed to new replies.

Advertisement