Game
Kordex - The Golden Path
7 years ago

Log #4: ShaderGraph bug (3.0.0-preview) in Unity 2018.2.0f2


Hey guys!

Yesterday I (accidentally) updated the Shader Graph from version 2.0.6-preview to 3.0.0-preview and had to realize that all my ShaderGraph-shaders are destroyed!

The error message: Shader is not supported on this GPU

5d09b7579c0f9.png

After hours of searching for the cause of the issue, I noticed that Unity automatically transforms my floating-point inputs separated by a dot (e.g. “1.23753”) into values separated by a comma (“1,23753”).

5d09b7592ac32.png

Of course, when the Graph is translated into code, the result is crap. Vectors with four elements (e.g. (1.2, 1.2, 1.2, 1)) are transformed into Vectors with more than four elements (1,2, 1,2, 1,2, 1) which can’t work obviously.

5d09b75b0e733.png

The solution

The solution is quite easy: avoid using floating point values in your properties list (values baked directly into the shader are translated correctly). Set your properties to 1 instead of 0.8 and set your colors to FFFFFF or 000000 instead of A8A8A8 etc.

Of course, the problem that comes with this solution is, that you can’t set appropriate default values for your shaders. You have to decide between the reliability of your coded shaders and the comfort of the shader graph.

Or even better: write a tool, which automatically sets property values for all materials using a specific shader. Then you’re able to set the default integer values in the shader graph and reassign those properties for all materials with appropriate floating point values.

Thanks for reading!



0 comments

Loading...

Next up

Log #2: New Island Part

"Thanks guys for endless hours of fun." 👍

(My first fan art. Read the article, please.)

#sonic #mario #photoshop

Today I was setting up the location of the first boss. His name is "Father" and he is the first of the Patagonians. His task is to guard the road to the House.🛡🗡 Bookmark pre-launch page🔖🔖🔖

https://www.kickstarter.com/projects/rdvindiegame/the-patagonian…

Protege el conocimiento, salva la historia. Guardian of Lore es un platformer 2D en el que debes luchar para mantener viva la memoria de la mitología latinoamericana. El juego llegará a Steam el 18 de mayo: https://steam.pm/app/1211740 #ScreenshotSaturday

The whole squad is here!

Interested? Follow me!

Very ambitious construction going on in Planet Zoo on Plays today. We're tryin'. LIVE: www.twitch.tv/dreamhackplays

brung back my old oc plus a new one

...they don`t have names yet tho

Double Rainbow!!!

I just wanted to introduce you to my latest musical production and hear some opinions about it. Thank you very much.

Pigs can push buttons for you!

#gamedev #pixelart #screenshotsaturday

Don't forget to wishlist Toodee and Topdee on Steam!

https://store.steampowered.com/app/1303950/Toodee_and_Topdee/