Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/eevee/shaders/bsdf_lut_frag.glsl
| #pragma BLENDER_REQUIRE(common_utiltex_lib.glsl) | #pragma BLENDER_REQUIRE(common_utiltex_lib.glsl) | ||||
| #pragma BLENDER_REQUIRE(bsdf_sampling_lib.glsl) | #pragma BLENDER_REQUIRE(bsdf_sampling_lib.glsl) | ||||
| uniform float sampleCount; | |||||
| out vec2 FragColor; | |||||
| void main() | void main() | ||||
| { | { | ||||
| /* Make sure coordinates are covering the whole [0..1] range at texel center. */ | /* Make sure coordinates are covering the whole [0..1] range at texel center. */ | ||||
| float y = floor(gl_FragCoord.y) / (LUT_SIZE - 1); | float y = floor(gl_FragCoord.y) / (LUT_SIZE - 1); | ||||
| float x = floor(gl_FragCoord.x) / (LUT_SIZE - 1); | float x = floor(gl_FragCoord.x) / (LUT_SIZE - 1); | ||||
| float NV = clamp(1.0 - y * y, 1e-4, 0.9999); | float NV = clamp(1.0 - y * y, 1e-4, 0.9999); | ||||
| float a = x * x; | float a = x * x; | ||||
| ▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines | |||||