diff options
author | CrystalPT <CrystalPT@svn> | 2010-08-24 03:06:43 +0000 |
---|---|---|
committer | CrystalPT <CrystalPT@svn> | 2010-08-24 03:06:43 +0000 |
commit | e96679a924ba6eecb58aad93e15610b2c75be6af (patch) | |
tree | 6214c20af940b370a2cbd9647b83a62a3f2dac6c /system/shaders | |
parent | 381f74049e366dfedfe1fa18d5e466b70273c7a4 (diff) |
[WIN32] added: PS renderer support for HW without float textures (Intel 3100 for example)
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@33079 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'system/shaders')
-rw-r--r-- | system/shaders/convolution-4x4_d3d.fx | 13 | ||||
-rw-r--r-- | system/shaders/convolution-6x6_d3d.fx | 13 |
2 files changed, 24 insertions, 2 deletions
diff --git a/system/shaders/convolution-4x4_d3d.fx b/system/shaders/convolution-4x4_d3d.fx index b169e9adf3..9939cef33c 100644 --- a/system/shaders/convolution-4x4_d3d.fx +++ b/system/shaders/convolution-4x4_d3d.fx @@ -57,7 +57,18 @@ struct PS_OUTPUT half4 weight(float pos) { - return tex1D(KernelSampler, pos); + half4 w; +#ifdef HAS_RGBA + w = tex1D(KernelSampler, pos); +#else + w = tex1D(KernelSampler, pos).bgra; +#endif + +#ifdef HAS_FLOAT_TEXTURE + return w; +#else + return w * 2.0 - 1.0; +#endif } half3 pixel(float xpos, float ypos) diff --git a/system/shaders/convolution-6x6_d3d.fx b/system/shaders/convolution-6x6_d3d.fx index e95344684e..67fc57a89d 100644 --- a/system/shaders/convolution-6x6_d3d.fx +++ b/system/shaders/convolution-6x6_d3d.fx @@ -57,7 +57,18 @@ struct PS_OUTPUT half3 weight(float pos) { - return tex1D(KernelSampler, pos).rgb; + half3 w; +#ifdef HAS_RGBA + w = tex1D(KernelSampler, pos).rgb; +#else + w = tex1D(KernelSampler, pos).bgr; +#endif + +#ifdef HAS_FLOAT_TEXTURE + return w; +#else + return w * 2.0 - 1.0; +#endif } half3 pixel(float xpos, float ypos) |