No Description

cubemapdisplay.frag 379B

12345678910111213141516
  1. #version 450
  2. #extension GL_ARB_separate_shader_objects : enable
  3. #extension GL_ARB_shading_language_420pack : enable
  4. layout (binding = 1) uniform samplerCube shadowCubeMap;
  5. layout (location = 0) in vec3 inUVW;
  6. layout (location = 0) out vec4 outFragColor;
  7. void main()
  8. {
  9. float dist = length(texture(shadowCubeMap, inUVW).rgb) * 0.005;
  10. outFragColor = vec4(vec3(dist), 1.0);
  11. }