Previous 199869 Revisions Next

r46610 Wednesday 23rd March, 2016 at 14:11:12 UTC by Ryan Holtz
Add screen-specific shader chain support, nw
[/branches/bgfx_shader/bgfx/effects]defocus.json distortion.json
[/branches/bgfx_shader/bgfx/shaders/dx11]fs_blit.bin fs_color.bin fs_deconverge.bin fs_defocus.bin fs_distortion.bin fs_gui.bin fs_ntsc_decode.bin fs_ntsc_encode.bin fs_phosphor.bin fs_post.bin fs_screen.bin vs_blit.bin vs_color.bin vs_deconverge.bin vs_defocus.bin vs_distortion.bin vs_gui.bin vs_ntsc_decode.bin vs_ntsc_encode.bin vs_phosphor.bin vs_post.bin vs_screen.bin
[/branches/bgfx_shader/bgfx/shaders/dx9]fs_blit.bin fs_color.bin fs_deconverge.bin fs_defocus.bin fs_distortion.bin fs_gui.bin fs_ntsc_decode.bin fs_ntsc_encode.bin fs_phosphor.bin fs_post.bin fs_screen.bin vs_blit.bin vs_color.bin vs_deconverge.bin vs_defocus.bin vs_distortion.bin vs_gui.bin vs_ntsc_decode.bin vs_ntsc_encode.bin vs_phosphor.bin vs_post.bin vs_screen.bin
[/branches/bgfx_shader/bgfx/shaders/gles]fs_defocus.bin fs_distortion.bin
[/branches/bgfx_shader/bgfx/shaders/glsl]fs_defocus.bin fs_distortion.bin
[/branches/bgfx_shader/bgfx/shaders/metal]fs_defocus.bin fs_distortion.bin
[/branches/bgfx_shader/src/osd/modules/lib]osdobj_common.cpp osdobj_common.h
[/branches/bgfx_shader/src/osd/modules/render]drawbgfx.cpp drawbgfx.h
[/branches/bgfx_shader/src/osd/modules/render/bgfx]chainentry.cpp chainentry.h chainentryreader.cpp effectmanager.cpp effectreader.cpp fs_defocus.sc fs_distortion.sc inputpair.cpp

branches/bgfx_shader/bgfx/effects/defocus.json
r255121r255122
1818    "fragment": "fs_defocus",
1919    "uniforms": [
2020       { "name": "s_tex",         "type": "int",  "values": [ 1.0 ] },
21       { "name": "u_screen_dims", "type": "vec4", "values": [ 1.0, 0.0, 0.0, 0.0 ] },
21       { "name": "u_tex_size0",  "type": "vec4", "values": [ 1.0, 0.0, 0.0, 0.0 ] },
2222       { "name": "u_defocus",     "type": "vec4", "values": [ 0.5, 0.5, 0.0, 0.0 ] }
2323    ]
2424}
No newline at end of file
branches/bgfx_shader/bgfx/effects/distortion.json
r255121r255122
1717    "vertex": "vs_distortion",
1818    "fragment": "fs_distortion",
1919    "uniforms": [
20       { "name": "s_tex",           "type": "int",  "values": [ 0.0 ] },
21       { "name": "u_screen_dims",   "type": "vec4", "values": [ 1.0,  1.0, 0.0, 0.0 ] },
22       { "name": "u_curvature",     "type": "vec4", "values": [ 0.25, 0.0, 0.0, 0.0 ] },
23       { "name": "u_round_corner",  "type": "vec4", "values": [ 0.2,  0.0, 0.0, 0.0 ] },
24       { "name": "u_smooth_border", "type": "vec4", "values": [ 0.05, 0.0, 0.0, 0.0 ] },
25       { "name": "u_vignetting",    "type": "vec4", "values": [ 0.20, 0.0, 0.0, 0.0 ] },
26       { "name": "u_reflection",    "type": "vec4", "values": [ 0.30, 0.0, 0.0, 0.0 ] },
27       { "name": "u_rotation_type", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] }
20       { "name": "s_tex",            "type": "int",  "values": [ 0.0 ] },
21       { "name": "u_swap_xy",        "type": "vec4", "values": [ 0.0,  0.0, 0.0, 0.0 ] },
22       { "name": "u_screen_dims",    "type": "vec4", "values": [ 1.0,  1.0, 0.0, 0.0 ] },
23       { "name": "u_quad_dims",      "type": "vec4", "values": [ 1.0,  1.0, 0.0, 0.0 ] },
24       { "name": "u_rotation_type",  "type": "vec4", "values": [ 0.0,  0.0, 0.0, 0.0 ] },
25       { "name": "u_prepare_vector", "type": "vec4", "values": [ 0.0,  0.0, 0.0, 0.0 ] },
26       { "name": "u_curvature",      "type": "vec4", "values": [ 0.25, 0.0, 0.0, 0.0 ] },
27       { "name": "u_round_corner",   "type": "vec4", "values": [ 0.2,  0.0, 0.0, 0.0 ] },
28       { "name": "u_smooth_border",  "type": "vec4", "values": [ 0.05, 0.0, 0.0, 0.0 ] },
29       { "name": "u_vignetting",     "type": "vec4", "values": [ 0.20, 0.0, 0.0, 0.0 ] },
30       { "name": "u_reflection",     "type": "vec4", "values": [ 0.30, 0.0, 0.0, 0.0 ] }
2831    ]
2932}
No newline at end of file
branches/bgfx_shader/bgfx/shaders/dx11/fs_blit.bin
r255121r255122
1FSHƒòás_tex0|ŸDXBCÄÍb!>/õš*Ü7!Ì̟|Ÿ0¤ØtISGNlP\bSV_POSITIONCOLORTEXCOORD«OSGN, SV_TARGET««SHDR”@%Z`XpUUbòb2eò hE   òFF~`8ò FF>SPDBžMicrosoft C/C++ MSF 7.00
2DSOXKÀÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ8ðÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ <ÿÿÿÿ”.1³îVŽq¨I@—KÝo€thÜQ3r2D _sampler, float3 _coord)
1FSHƒòás_tex0|§DXBCÙîôü   ‘}ˇhSö{|§0¤ØtISGNlP\bSV_POSITIONCOLORTEXCOORD«OSGN, SV_TARGET««SHDR”@%Z`XpUUbòb2eò hE   òFF~`8ò FF>SPDB¦Microsoft C/C++ MSF 7.00
2DSSlPÀÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ8þÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ <ÿÿÿÿ”.1סòVWLÅzpE/O§Zøº¶KÊQÜQ3}
3float4 uintBitsToFloat(uint4 _x) { return asfloat(_x); }
4uint floatBitsToUint(float _x) { return asuint(_x); }
5uint2 floatBitsToUint(float2 _x) { return asuint(_x); }
6uint3 floatBitsToUint(float3 _x) { return asuint(_x); }
7uint4 floatBitsToUint(float4 _x) { return asuint(_x); }
8int floatBitsToInt(float _x) { return asint(_x); }
9int2 floatBitsToInt(float2 _x) { return asint(_x); }
10int3 floatBitsToInt(float3 _x) { return asint(_x); }
11int4 floatBitsToInt(float4 _x) { return asint(_x); }
12uint bitfieldReverse(ÆZuƒÞîP…SCj +ã   S
13%ÿA$EqVA¹»5®float intBitsToFloat(int _x) { return asfloat(_x); }
14float2 intBitsToFloat(uint2 _x) { return asfloat(_x); }
15float3 intBitsToFloat(uint3 _x) { return asfloat(_x); }
16float4 intBitsToFloat(uint4 _x) { return asfloat(_x); }
17float uintBitsToFloat(uint _x) { return asfloat(_x); }
18float2 uintBitsToFloat(uint2 _x) { return asfloat(_x); }
19float3 uintBitsToFloat(uint3 _x) { return asfloat(_x); }
20float4 uintBitsToFloat(uint4 _x) { return asfloat(_x); }
21uint floatBitsToUint(float _x) { return asuint(_x); }
22uint2 floatBitsToUint(float2 _x) { return asuint(_x); }
23uint3 floatBitsToUint(float3 _x) { return asuint(_x); }
24uint4 floatBitsToUint(float4 _x) { return asuint(_x); }
25int floatBitsToInt(float _x) { return asint(_x); }
26int2 floatBitsToInt(float2 _x) { return asint(_x); }
27int3 floatBitsToInt(float3 _x) { return asint(_x); }
28int4 floatBitsToInt(float4 _x) { return asint(_x); }
29uint bitfieldReverse(uint _x) { return reversebits(_x); }
30uint2 bitfieldReverse(uint2 _x) { return reversebits(_x); }
31uint3 bitfieldReverse(uint3 _x) { return reversebits(_x); }
32uint4 bitfieldReverse(uint4 _x) { return reversebits(_x); }
33uint packHalf2x16(float2 _x)
334{
4float2 coord = _coord.xy * rcp(_coord.z);
5return _sampler.m_texture.Sample(_sampler.m_sampler, coord);
35return (f32tof16(_x.x)<<16) | f32tof16(_x.y);
636}
7float4 bgfxTexture2DProj(BgfxSampler2D _sampler, float4 _coord)
37float2 unpackHalf2x16(uint _x)
838{
9float2 coord = _coord.xy * rcp(_coord.w);
10return _sampler.m_texture.Sample(_sampler.m_sampler, coord);
39return float2(f16tof32(_x >> 16), f16tof32(_x) );
1140}
12struct BgfxSampler2DShadow
41struct BgfxSampler2D
1342{
14SamplerComparisonState m_sampler;
15Texture2D m_texture;
16};
17float bgfxShadow2D(BgfxSampler2DShadow _sampler, float3 _coord)
18{
19return _sampler.m_texture.SampleCmpLevelZero(_sampleÆZuƒÞîP…SÈQB÷   S
20%ÿA$E­IA¹   ñstruct BgfxSampler2D
21{
2243SamplerState m_sampler;
2344Texture2D m_texture;
2445};
r255121r255122
Previous 199869 Revisions Next


© 1997-2024 The MAME Team