question about iitter code
shadercoder opened this issue · 4 comments
Hi
about this code for sampling blue noise texture..
float2 jitter = tex2Dlod(_Noise, float4((uv + random) * _RayCastSize.xy / 256, 0, -255));
what is the LOD of -255 value? i only know this should be range from 0 to MaxMipmaplevel(float point)
thanks
peter
Hey,
This is just to prevent the shader to sample any mipmap, it's just a safety check :).
Cheers
Hi
thank you
well, is this standard way to access the blue noise texture(i mean the texture coordinate part) or just up to you?
peter
Hey,
I think it's pretty standard way excepth the -255 maybe, but the screenUV * screenSize / sampleTextureSize part is common. About the random part it's kind of an hack I made, it would be better I think to use an animated texture with 16 slice, maybe more. Sometimes the noise get sampled at the same position on screen which is not good for temporal.
Cheers
Hi thanks for your reply. too late to see the reply.