Skip to content

Instantly share code, notes, and snippets.

@chrisperrella
Last active April 1, 2024 17:00
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisperrella/bf5d863766da8ab66fc253b822fad144 to your computer and use it in GitHub Desktop.
Save chrisperrella/bf5d863766da8ab66fc253b822fad144 to your computer and use it in GitHub Desktop.
A custom shader for Marmoset Toolbag 3 that uses the second uv set for the Albedo subroutine.
#include "data/shader/mat/state.frag"
void AlbedoMapUV2( inout FragmentState s )
{
s.albedo = textureMaterial( tAlbedoMap, s.vertexTexCoordSecondary );
s.albedo.xyz *= uAlbedoMapColor;
}
#ifdef Albedo
#undef Albedo
#endif
#define Albedo AlbedoMapUV2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment