Skip to content

Instantly share code, notes, and snippets.

View robertobrambila's full-sized avatar

Roberto Brambila robertobrambila

View GitHub Profile
@bestknighter
bestknighter / DebugNode.hlsl
Last active February 23, 2024 09:56 — forked from aras-p/DebugNode.hlsl
"Print a value" custom function node code for Unity ShaderGraph, aware of +Inf/-Inf and nan
// This gist can be found at https://gist.github.com/bestknighter/660e6a53cf6a6643618d8531f962be2c
// I modified Aras Pranckevičius's awesome shader code to be able to handle Infinite and Not A Number numbers
// Tested on Unity 2023.1.0a15 with ShaderGraph 15.0.1.
// Quick try at doing a "print value" node for Unity ShaderGraph.
//
// Use with CustomFunction node, with two inputs:
// - Vector1 Value, the value to display,
// - Vector2 UV, the UVs of area to display at.
@nemotoo
nemotoo / .gitattributes
Last active May 2, 2024 18:33
.gitattributes for Unity3D with git-lfs
## Unity ##
*.cs diff=csharp text
*.cginc text
*.shader text
*.mat merge=unityyamlmerge eol=lf
*.anim merge=unityyamlmerge eol=lf
*.unity merge=unityyamlmerge eol=lf
*.prefab merge=unityyamlmerge eol=lf