| 1 |
#version 450 |
| 2 |
|
| 3 |
layout(binding = 1) uniform samplerCube samplerColor; |
| 4 |
|
| 5 |
layout(location = 0) in vec3 inPos; |
| 6 |
layout(location = 1) in vec3 inNormal; |
| 7 |
layout(location = 2) in mat4 inInvModelView; |
| 8 |
layout(location = 6) in float inLodBias; |
| 9 |
layout(location = 0) out vec4 outFragColor; |
| 10 |
|
| 11 |
void main() |
| 12 |
{ |
| 13 |
vec3 cI = normalize(inPos); |
| 14 |
vec3 cR = reflect(cI, normalize(inNormal)); |
| 15 |
cR = vec3((inInvModelView * vec4(cR, 0.0)).xyz); |
| 16 |
cR.x *= (-1.0); |
| 17 |
outFragColor = texture(samplerColor, cR, inLodBias); |
| 18 |
} |
| 19 |
|