This commit is contained in:
Branimir Karadžić 2016-03-31 17:45:52 -07:00
Родитель 1d8c456536
Коммит 3b0fc49c0e
1 изменённых файлов: 34 добавлений и 34 удалений

Просмотреть файл

@ -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);