Branimir Karadžić 9 년 전
부모
커밋
3b0fc49c0e
1개의 변경된 파일34개의 추가작업 그리고 34개의 파일을 삭제
  1. 34 34
      src/bgfx_shader.sh

+ 34 - 34
src/bgfx_shader.sh

@@ -88,6 +88,40 @@ struct BgfxSampler2D
 	Texture2D m_texture;
 };
 
+struct BgfxSampler2DShadow
+{
+	SamplerComparisonState m_sampler;
+	Texture2D m_texture;
+};
+
+struct BgfxSampler3D
+{
+	SamplerState m_sampler;
+	Texture3D m_texture;
+};
+
+struct BgfxISampler3D
+{
+	Texture3D<ivec4> m_texture;
+};
+
+struct BgfxUSampler3D
+{
+	Texture3D<uvec4> m_texture;
+};
+
+struct BgfxSamplerCube
+{
+	SamplerState m_sampler;
+	TextureCube m_texture;
+};
+
+struct BgfxSampler2DMS
+{
+	SamplerState m_sampler;
+	Texture2DMS<vec4> m_texture;
+};
+
 vec4 bgfxTexture2D(BgfxSampler2D _sampler, vec2 _coord)
 {
 	return _sampler.m_texture.Sample(_sampler.m_sampler, _coord);
@@ -110,18 +144,6 @@ vec4 bgfxTexture2DProj(BgfxSampler2D _sampler, vec4 _coord)
 	return _sampler.m_texture.Sample(_sampler.m_sampler, coord);
 }
 
-struct BgfxSampler2DMS
-{
-	SamplerState m_sampler;
-	Texture2DMS m_texture;
-};
-
-struct BgfxSampler2DShadow
-{
-	SamplerComparisonState m_sampler;
-	Texture2D m_texture;
-};
-
 float bgfxShadow2D(BgfxSampler2DShadow _sampler, vec3 _coord)
 {
 	return _sampler.m_texture.SampleCmpLevelZero(_sampler.m_sampler, _coord.xy, _coord.z);
@@ -133,22 +155,6 @@ float bgfxShadow2DProj(BgfxSampler2DShadow _sampler, vec4 _coord)
 	return _sampler.m_texture.SampleCmpLevelZero(_sampler.m_sampler, coord.xy, coord.z);
 }
 
-struct BgfxSampler3D
-{
-	SamplerState m_sampler;
-	Texture3D m_texture;
-};
-
-struct BgfxISampler3D
-{
-	Texture3D<ivec4> m_texture;
-};
-
-struct BgfxUSampler3D
-{
-	Texture3D<uvec4> m_texture;
-};
-
 vec4 bgfxTexture3D(BgfxSampler3D _sampler, vec3 _coord)
 {
 	return _sampler.m_texture.Sample(_sampler.m_sampler, _coord);
@@ -173,12 +179,6 @@ uvec4 bgfxTexture3D(BgfxUSampler3D _sampler, vec3 _coord)
 	return _sampler.m_texture.Load(uvec4(_coord * size, 0) );
 }
 
-struct BgfxSamplerCube
-{
-	SamplerState m_sampler;
-	TextureCube m_texture;
-};
-
 vec4 bgfxTextureCube(BgfxSamplerCube _sampler, vec3 _coord)
 {
 	return _sampler.m_texture.Sample(_sampler.m_sampler, _coord);