• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Support v
« Previous 1 ... 9 10 11 12 13 ... 1197 Next »

glsl shader file rewrite
View New Posts | View Today's Posts

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
glsl shader file rewrite
01-13-2023, 02:05 PM
#1
sh5dc Offline
Junior Member
**
Posts: 6
Threads: 1
Joined: Jan 2023
Contrast Adaptive Sharpening (cas shapeness shader) any chance add it to dolphin android? aethersx did it on 1/1/2023 before shutdown it make game at 1x res look like on real crt tv from year 2000....

swear to god no other crt shader can beat this Contrast Adaptive Sharpening
[Image: residentevil4-crtllit9.jpg]

=========*





// Based on CAS_Shader.glsl
// Copyright© 2019 Advanced Micro Devices, Inc.All rights reserved.
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files(the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions :
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

uniform uvec4 const0;
uniform uvec4 const1;
uniform ivec2 srcOffset;

layout(binding=0) uniform sampler2D imgSrc;
layout(binding=0, rgba8) uniform writeonly image2D imgDst;

#define A_GPU 1
#define A_GLSL 1

#include "ffx_a.h"

AF3 CasLoad(ASU2 p)
{
return texelFetch(imgSrc, srcOffset + ivec2(p), 0).rgb;
}

// Lets you transform input from the load into a linear color space between 0 and 1. See ffx_cas.h
// In this case, our input is already linear and between 0 and 1
void CasInput(inout AF1 r, inout AF1 g, inout AF1 b) {}

#include "ffx_cas.h"

layout(local_size_x=64) in;
void main()
{
// Do remapping of local xy in workgroup for a more PS-like swizzle pattern.
AU2 gxy = ARmp8x8(gl_LocalInvocationID.x)+AU2(gl_WorkGroupID.x<<4u,gl_WorkGroupID.y<<4u);

// Filter.
AF4 c;
CasFilter(c.r, c.g, c.b, gxy, const0, const1, CAS_SHARPEN_ONLY);
imageStore(imgDst, ASU2(gxy), c);
gxy.x += 8u;

CasFilter(c.r, c.g, c.b, gxy, const0, const1, CAS_SHARPEN_ONLY);
imageStore(imgDst, ASU2(gxy), c);
gxy.y += 8u;

CasFilter(c.r, c.g, c.b, gxy, const0, const1, CAS_SHARPEN_ONLY);
imageStore(imgDst, ASU2(gxy), c);
gxy.x -= 8u;

CasFilter(c.r, c.g, c.b, gxy, const0, const1, CAS_SHARPEN_ONLY);
imageStore(imgDst, ASU2(gxy), c);
}
Find
Reply
01-13-2023, 07:47 PM
#2
sh5dc Offline
Junior Member
**
Posts: 6
Threads: 1
Joined: Jan 2023
here is aethersx2 shader glsl file from apk package


Attached Files
.zip   shaders.zip (Size: 413.73 KB / Downloads: 21)
Find
Reply
01-14-2023, 03:07 AM
#3
AnyOldName3 Offline
First Random post over 9000
*******
Posts: 3,533
Threads: 1
Joined: Feb 2012
CAS is a sharpening filter, not a CRT effect shader. Anything run through it will look less like it would on a CRT screen. If you find it's making things look nicer (which it often does), then you probably don't want a CRT effect.
OS: Windows 10 64 bit Professional
CPU: AMD Ryzen 5900X
RAM: 16GB
GPU: Radeon Vega 56
Find
Reply
01-14-2023, 02:22 PM
#4
sh5dc Offline
Junior Member
**
Posts: 6
Threads: 1
Joined: Jan 2023
(01-14-2023, 03:07 AM)AnyOldName3 Wrote: CAS is a sharpening filter, not a CRT effect shader. Anything run through it will look less like it would on a CRT screen. If you find it's making things look nicer (which it often does), then you probably don't want a CRT effect.

i dont know if should call it crt

but if you install aethersx2 1.5 version


theres option enable this cas sharpness from 0-100

i set it to 3


at 1x res on 10 inch tablet like tab s4 etc....
it feels like 100% correct output from old tv
Find
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode