update
This commit is contained in:
12
shader/skybox.fragment.glsl
Normal file
12
shader/skybox.fragment.glsl
Normal file
@ -0,0 +1,12 @@
|
||||
#version 330
|
||||
|
||||
in vec3 TexCoord0;
|
||||
|
||||
out vec4 FragColor;
|
||||
|
||||
uniform samplerCube gCubemapTexture;
|
||||
|
||||
void main()
|
||||
{
|
||||
FragColor = texture(gCubemapTexture, TexCoord0);
|
||||
}
|
14
shader/skybox.vertex.glsl
Normal file
14
shader/skybox.vertex.glsl
Normal file
@ -0,0 +1,14 @@
|
||||
#version 330
|
||||
|
||||
in vec3 Position;
|
||||
|
||||
uniform mat4 gWVP;
|
||||
|
||||
out vec3 TexCoord0;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 WVP_Pos = gWVP * vec4(Position, 1.0);
|
||||
gl_Position = WVP_Pos.xyww;
|
||||
TexCoord0 = Position;
|
||||
}
|
Reference in New Issue
Block a user