- add the use of DRWShaderLibrary to EEVEE's glsl codebase to reduce code complexity and duplication. - split bsdf_common_lib.glsl into multiple sub library which are now shared with other engines. - the surface shader code is now more organised and have its own files. - change default world to use a material nodetree and make lookdev shader more clear. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D8306
19 lines
435 B
GLSL
19 lines
435 B
GLSL
|
|
#pragma BLENDER_REQUIRE(common_math_lib.glsl)
|
|
|
|
uniform sampler2D blueNoise;
|
|
uniform vec3 offsets;
|
|
|
|
out vec4 FragColor;
|
|
|
|
void main(void)
|
|
{
|
|
vec3 blue_noise = texelFetch(blueNoise, ivec2(gl_FragCoord.xy), 0).xyz;
|
|
|
|
float noise = fract(blue_noise.y + offsets.z);
|
|
FragColor.x = fract(blue_noise.x + offsets.x);
|
|
FragColor.y = fract(blue_noise.z + offsets.y);
|
|
FragColor.z = cos(noise * M_2PI);
|
|
FragColor.w = sin(noise * M_2PI);
|
|
}
|