refactor: rename ui_editor to editor for consistency
This commit is contained in:
35
参考/Fermion/Boson/Resources/Shaders/Skybox.glsl
Normal file
35
参考/Fermion/Boson/Resources/Shaders/Skybox.glsl
Normal file
@@ -0,0 +1,35 @@
|
||||
#type vertex
|
||||
#version 450 core
|
||||
layout(location = 0) in vec3 a_Position;
|
||||
|
||||
out vec3 v_TexCoords;
|
||||
|
||||
uniform mat4 u_View;
|
||||
uniform mat4 u_Projection;
|
||||
|
||||
void main() {
|
||||
v_TexCoords = a_Position;
|
||||
|
||||
mat4 view = mat4(mat3(u_View));
|
||||
vec4 clipPos = u_Projection * view * vec4(a_Position, 1.0);
|
||||
gl_Position = vec4(clipPos.xy, clipPos.w, clipPos.w); // Force depth to far plane to avoid occluding scene geometry
|
||||
}
|
||||
|
||||
#type fragment
|
||||
#version 450 core
|
||||
in vec3 v_TexCoords;
|
||||
out vec4 FragColor;
|
||||
|
||||
uniform samplerCube u_Cubemap;
|
||||
|
||||
void main() {
|
||||
vec3 color = texture(u_Cubemap, v_TexCoords).rgb;
|
||||
|
||||
// HDR色调映射 (Reinhard)
|
||||
color = color / (color + vec3(1.0));
|
||||
|
||||
// Gamma校正
|
||||
color = pow(color, vec3(1.0/2.2));
|
||||
|
||||
FragColor = vec4(color, 1.0);
|
||||
}
|
||||
Reference in New Issue
Block a user