forked from libsdl-org/SDL
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'SDL2' into MorphOS-SDL-2
- Loading branch information
Showing
38 changed files
with
1,468 additions
and
287 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
struct PixelShaderInput | ||
{ | ||
float4 pos : SV_POSITION; | ||
float2 tex : TEXCOORD0; | ||
float4 color : COLOR0; | ||
}; | ||
|
||
#define ColorRS \ | ||
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \ | ||
"DENY_DOMAIN_SHADER_ROOT_ACCESS |" \ | ||
"DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \ | ||
"DENY_HULL_SHADER_ROOT_ACCESS )," \ | ||
"RootConstants(num32BitConstants=32, b0)" | ||
|
||
[RootSignature(ColorRS)] | ||
float4 main(PixelShaderInput input) : SV_TARGET0 | ||
{ | ||
return input.color; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
Texture2D theTextureY : register(t0); | ||
Texture2D theTextureUV : register(t1); | ||
SamplerState theSampler : register(s0); | ||
|
||
struct PixelShaderInput | ||
{ | ||
float4 pos : SV_POSITION; | ||
float2 tex : TEXCOORD0; | ||
float4 color : COLOR0; | ||
}; | ||
|
||
#define NVRS \ | ||
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \ | ||
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \ | ||
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \ | ||
" DENY_HULL_SHADER_ROOT_ACCESS )," \ | ||
"RootConstants(num32BitConstants=32, b0),"\ | ||
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\ | ||
"DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\ | ||
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )" | ||
|
||
[RootSignature(NVRS)] | ||
float4 main(PixelShaderInput input) : SV_TARGET | ||
{ | ||
const float3 offset = {-0.0627451017, -0.501960814, -0.501960814}; | ||
const float3 Rcoeff = {1.1644, 0.0000, 1.5960}; | ||
const float3 Gcoeff = {1.1644, -0.3918, -0.8130}; | ||
const float3 Bcoeff = {1.1644, 2.0172, 0.0000}; | ||
|
||
float4 Output; | ||
|
||
float3 yuv; | ||
yuv.x = theTextureY.Sample(theSampler, input.tex).r; | ||
yuv.yz = theTextureUV.Sample(theSampler, input.tex).rg; | ||
|
||
yuv += offset; | ||
Output.r = dot(yuv, Rcoeff); | ||
Output.g = dot(yuv, Gcoeff); | ||
Output.b = dot(yuv, Bcoeff); | ||
Output.a = 1.0f; | ||
|
||
return Output * input.color; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
Texture2D theTextureY : register(t0); | ||
Texture2D theTextureUV : register(t1); | ||
SamplerState theSampler : register(s0); | ||
|
||
struct PixelShaderInput | ||
{ | ||
float4 pos : SV_POSITION; | ||
float2 tex : TEXCOORD0; | ||
float4 color : COLOR0; | ||
}; | ||
|
||
#define NVRS \ | ||
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \ | ||
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \ | ||
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \ | ||
" DENY_HULL_SHADER_ROOT_ACCESS )," \ | ||
"RootConstants(num32BitConstants=32, b0),"\ | ||
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\ | ||
"DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\ | ||
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )" | ||
|
||
[RootSignature(NVRS)] | ||
float4 main(PixelShaderInput input) : SV_TARGET | ||
{ | ||
const float3 offset = {-0.0627451017, -0.501960814, -0.501960814}; | ||
const float3 Rcoeff = {1.1644, 0.0000, 1.7927}; | ||
const float3 Gcoeff = {1.1644, -0.2132, -0.5329}; | ||
const float3 Bcoeff = {1.1644, 2.1124, 0.0000}; | ||
|
||
float4 Output; | ||
|
||
float3 yuv; | ||
yuv.x = theTextureY.Sample(theSampler, input.tex).r; | ||
yuv.yz = theTextureUV.Sample(theSampler, input.tex).rg; | ||
|
||
yuv += offset; | ||
Output.r = dot(yuv, Rcoeff); | ||
Output.g = dot(yuv, Gcoeff); | ||
Output.b = dot(yuv, Bcoeff); | ||
Output.a = 1.0f; | ||
|
||
return Output * input.color; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
Texture2D theTextureY : register(t0); | ||
Texture2D theTextureUV : register(t1); | ||
SamplerState theSampler : register(s0); | ||
|
||
struct PixelShaderInput | ||
{ | ||
float4 pos : SV_POSITION; | ||
float2 tex : TEXCOORD0; | ||
float4 color : COLOR0; | ||
}; | ||
|
||
#define NVRS \ | ||
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \ | ||
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \ | ||
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \ | ||
" DENY_HULL_SHADER_ROOT_ACCESS )," \ | ||
"RootConstants(num32BitConstants=32, b0),"\ | ||
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\ | ||
"DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\ | ||
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )" | ||
|
||
[RootSignature(NVRS)] | ||
float4 main(PixelShaderInput input) : SV_TARGET | ||
{ | ||
const float3 offset = {0.0, -0.501960814, -0.501960814}; | ||
const float3 Rcoeff = {1.0000, 0.0000, 1.4020}; | ||
const float3 Gcoeff = {1.0000, -0.3441, -0.7141}; | ||
const float3 Bcoeff = {1.0000, 1.7720, 0.0000}; | ||
|
||
float4 Output; | ||
|
||
float3 yuv; | ||
yuv.x = theTextureY.Sample(theSampler, input.tex).r; | ||
yuv.yz = theTextureUV.Sample(theSampler, input.tex).rg; | ||
|
||
yuv += offset; | ||
Output.r = dot(yuv, Rcoeff); | ||
Output.g = dot(yuv, Gcoeff); | ||
Output.b = dot(yuv, Bcoeff); | ||
Output.a = 1.0f; | ||
|
||
return Output * input.color; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
Texture2D theTextureY : register(t0); | ||
Texture2D theTextureUV : register(t1); | ||
SamplerState theSampler : register(s0); | ||
|
||
struct PixelShaderInput | ||
{ | ||
float4 pos : SV_POSITION; | ||
float2 tex : TEXCOORD0; | ||
float4 color : COLOR0; | ||
}; | ||
|
||
#define NVRS \ | ||
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \ | ||
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \ | ||
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \ | ||
" DENY_HULL_SHADER_ROOT_ACCESS )," \ | ||
"RootConstants(num32BitConstants=32, b0),"\ | ||
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\ | ||
"DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\ | ||
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )" | ||
|
||
[RootSignature(NVRS)] | ||
float4 main(PixelShaderInput input) : SV_TARGET | ||
{ | ||
const float3 offset = {-0.0627451017, -0.501960814, -0.501960814}; | ||
const float3 Rcoeff = {1.1644, 0.0000, 1.5960}; | ||
const float3 Gcoeff = {1.1644, -0.3918, -0.8130}; | ||
const float3 Bcoeff = {1.1644, 2.0172, 0.0000}; | ||
|
||
float4 Output; | ||
|
||
float3 yuv; | ||
yuv.x = theTextureY.Sample(theSampler, input.tex).r; | ||
yuv.yz = theTextureUV.Sample(theSampler, input.tex).gr; | ||
|
||
yuv += offset; | ||
Output.r = dot(yuv, Rcoeff); | ||
Output.g = dot(yuv, Gcoeff); | ||
Output.b = dot(yuv, Bcoeff); | ||
Output.a = 1.0f; | ||
|
||
return Output * input.color; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
Texture2D theTextureY : register(t0); | ||
Texture2D theTextureUV : register(t1); | ||
SamplerState theSampler : register(s0); | ||
|
||
struct PixelShaderInput | ||
{ | ||
float4 pos : SV_POSITION; | ||
float2 tex : TEXCOORD0; | ||
float4 color : COLOR0; | ||
}; | ||
|
||
#define NVRS \ | ||
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \ | ||
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \ | ||
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \ | ||
" DENY_HULL_SHADER_ROOT_ACCESS )," \ | ||
"RootConstants(num32BitConstants=32, b0),"\ | ||
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\ | ||
"DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\ | ||
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )" | ||
|
||
[RootSignature(NVRS)] | ||
float4 main(PixelShaderInput input) : SV_TARGET | ||
{ | ||
const float3 offset = {-0.0627451017, -0.501960814, -0.501960814}; | ||
const float3 Rcoeff = {1.1644, 0.0000, 1.7927}; | ||
const float3 Gcoeff = {1.1644, -0.2132, -0.5329}; | ||
const float3 Bcoeff = {1.1644, 2.1124, 0.0000}; | ||
|
||
float4 Output; | ||
|
||
float3 yuv; | ||
yuv.x = theTextureY.Sample(theSampler, input.tex).r; | ||
yuv.yz = theTextureUV.Sample(theSampler, input.tex).gr; | ||
|
||
yuv += offset; | ||
Output.r = dot(yuv, Rcoeff); | ||
Output.g = dot(yuv, Gcoeff); | ||
Output.b = dot(yuv, Bcoeff); | ||
Output.a = 1.0f; | ||
|
||
return Output * input.color; | ||
} |
Oops, something went wrong.