35 lines
1.3 KiB
GLSL
35 lines
1.3 KiB
GLSL
Shader "Builtin Skybox"
|
|
{
|
|
Properties
|
|
{
|
|
_Tint ("Tint", Color) = (1,1,1,1) [Semantic(Tint)]
|
|
_Exposure ("Exposure", Float) = 1.0 [Semantic(Exposure)]
|
|
_Rotation ("Rotation", Float) = 0.0 [Semantic(Rotation)]
|
|
_MainTex ("Panoramic", 2D) = "white" [Semantic(SkyboxPanoramicTexture)]
|
|
_Tex ("Cubemap (HDR)", Cube) = "white" [Semantic(SkyboxTexture)]
|
|
}
|
|
SubShader
|
|
{
|
|
Pass
|
|
{
|
|
Name "Skybox"
|
|
Tags { "LightMode" = "Skybox" }
|
|
Resources
|
|
{
|
|
EnvironmentConstants (ConstantBuffer, 0, 0) [Semantic(Environment)]
|
|
MaterialConstants (ConstantBuffer, 1, 0) [Semantic(Material)]
|
|
SkyboxPanoramicTexture (Texture2D, 2, 0) [Semantic(SkyboxPanoramicTexture)]
|
|
SkyboxTexture (TextureCube, 3, 0) [Semantic(SkyboxTexture)]
|
|
LinearClampSampler (Sampler, 4, 0) [Semantic(LinearClampSampler)]
|
|
}
|
|
HLSLPROGRAM
|
|
#pragma vertex MainVS
|
|
#pragma fragment MainPS
|
|
#pragma backend D3D12 HLSL "skybox.vs.hlsl" "skybox.ps.hlsl" vs_5_0 ps_5_0
|
|
#pragma backend OpenGL GLSL "skybox.vert.glsl" "skybox.frag.glsl"
|
|
#pragma backend Vulkan GLSL "skybox.vert.vk.glsl" "skybox.frag.vk.glsl"
|
|
ENDHLSL
|
|
}
|
|
}
|
|
}
|