mirror of
https://github.com/raysan5/raylib.git
synced 2026-02-03 12:49:17 -05:00
Review skybox shaders
This commit is contained in:
@ -9,14 +9,11 @@
|
||||
#version 330
|
||||
|
||||
// Input vertex attributes (from vertex shader)
|
||||
in vec3 fragPosition;
|
||||
varying vec3 fragPosition;
|
||||
|
||||
// Input uniform values
|
||||
uniform sampler2D equirectangularMap;
|
||||
|
||||
// Output fragment color
|
||||
out vec4 finalColor;
|
||||
|
||||
vec2 SampleSphericalMap(vec3 v)
|
||||
{
|
||||
vec2 uv = vec2(atan(v.z, v.x), asin(v.y));
|
||||
@ -34,5 +31,5 @@ void main()
|
||||
vec3 color = texture(equirectangularMap, uv).rgb;
|
||||
|
||||
// Calculate final fragment color
|
||||
finalColor = vec4(color, 1.0);
|
||||
gl_FragColor = vec4(color, 1.0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user