-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JitterFreeLit Shader, just for you! #1
Comments
Thanks for this. I've tried testing this on Unity 2020.3.12f1 but there seems to be a bug with a variable SurfaceData2D. |
I know that added Renderer features to the 2D renderer with 2021.2, so any 2021.2 version would PROBABLY work, I'd guess. I don't have any older installs around at the moment, but I'd imagine any URP, replacing whatever SAMPLE_TEXTURE2D is doing the default processing in the first shader pass. ( Also, you need to add a few things up in the TEXTURE2D area, since it makes a different sampler which doesn't play nice with code. They're functionizing it or something. I'm not a big shader guy. But basically just make the first pass variable stuff look like this after the LightingUtility.hlsl include:
Then drop in the code for the smoothsample and replace two lines in the combined shape frag shader. Here's the basically untouched code, save for two lines:
Otherwise, everything is untouched in the URP Sprite-Lit-Default. |
For anyone else browsing through, you can also do a ShaderGraph version by just running the _MainTex and UV through the custom function.
|
Hello there! Im trying to implement this shader graph version but it doesnt seems to work. I'm at 2020.3.28f1 and 10.8.1 of ShaderGraph. And this is the custom node function: I have tried to use a HLSL file to create the function and I have check the precision properties and stuff, so any idea will be very appreciated. |
Howdy ho, neighbor.
I'm lazy and don't want to bother making a PR, but I edited the URP 2D Lit shader to include the JitterFree logic.
Free free to roll it into the repo if you want. It's working as expected for me on 2021.2.8f.
Here's the gist:
https://gist.github.com/digiwombat/1991353eadaf918291e8a199694fcc7c
The text was updated successfully, but these errors were encountered: