mirror of
https://github.com/holub/mame
synced 2025-07-01 08:18:59 +03:00
Add gamma correction for proper impulse response.
This commit is contained in:
parent
f1da2ecffa
commit
b2682b7c55
@ -13,6 +13,7 @@ texture Diffuse;
|
|||||||
sampler DiffuseSampler = sampler_state
|
sampler DiffuseSampler = sampler_state
|
||||||
{
|
{
|
||||||
Texture = <Diffuse>;
|
Texture = <Diffuse>;
|
||||||
|
SRGBTexture = TRUE;
|
||||||
MipFilter = LINEAR;
|
MipFilter = LINEAR;
|
||||||
MinFilter = LINEAR;
|
MinFilter = LINEAR;
|
||||||
MagFilter = LINEAR;
|
MagFilter = LINEAR;
|
||||||
@ -26,6 +27,7 @@ texture LastPass;
|
|||||||
sampler PreviousSampler = sampler_state
|
sampler PreviousSampler = sampler_state
|
||||||
{
|
{
|
||||||
Texture = <LastPass>;
|
Texture = <LastPass>;
|
||||||
|
SRGBTexture = TRUE;
|
||||||
MipFilter = LINEAR;
|
MipFilter = LINEAR;
|
||||||
MinFilter = LINEAR;
|
MinFilter = LINEAR;
|
||||||
MagFilter = LINEAR;
|
MagFilter = LINEAR;
|
||||||
@ -134,11 +136,12 @@ float4 ps_main(PS_INPUT Input) : COLOR
|
|||||||
}
|
}
|
||||||
// Prevent burn-in
|
// Prevent burn-in
|
||||||
if (DeltaTime > 0.0f) {
|
if (DeltaTime > 0.0f) {
|
||||||
float threshold = 0.5f / 255.0f; // Half-color increment
|
float threshold = 0.5f / 255.0f / 12.92; // Half-color increment
|
||||||
r = max(0.0f, r - threshold);
|
r = max(0.0f, r - threshold);
|
||||||
g = max(0.0f, g - threshold);
|
g = max(0.0f, g - threshold);
|
||||||
b = max(0.0f, b - threshold);
|
b = max(0.0f, b - threshold);
|
||||||
}
|
}
|
||||||
|
|
||||||
float RedMax = max(CurrPix.r, r);
|
float RedMax = max(CurrPix.r, r);
|
||||||
float GreenMax = max(CurrPix.g, g);
|
float GreenMax = max(CurrPix.g, g);
|
||||||
float BlueMax = max(CurrPix.b, b);
|
float BlueMax = max(CurrPix.b, b);
|
||||||
@ -155,6 +158,7 @@ technique DefaultTechnique
|
|||||||
{
|
{
|
||||||
pass Pass0
|
pass Pass0
|
||||||
{
|
{
|
||||||
|
SRGBWriteEnable = TRUE;
|
||||||
Lighting = FALSE;
|
Lighting = FALSE;
|
||||||
|
|
||||||
VertexShader = compile vs_2_0 vs_main();
|
VertexShader = compile vs_2_0 vs_main();
|
||||||
|
Loading…
Reference in New Issue
Block a user