Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs

How to customize shaders beyond base color?

A topic by Andi McClure created Jul 06, 2018 Views: 94 Replies: 1
Viewing posts 1 to 2

I am looking at the instructions for material snippets:

https://kev.town/raymarching/reference/snippets/

…and I have tried creating a material snippet by duplicating one of the material snippets in Snippets/Materials.

I find that I can return a single color, and that color will be dutifully shaded according to lighting and then shadowed.

But let's say I want to write my own shading— I want to draw a solid color, or cel-shade, or rim shade or whatnot. Can this be customized?

So the final raymarching shader will use a shading function found in the default shader template, a file that’s parsed to define how the final shader is assembled.

To do your own shading you’ll need to make your own template, which gives you full control. We’re about to add documentation about how to do that, but it involves duplicating the included RaymarchTemplate file and dragging the new one on the “Shader Template” property of the Raymarcher component, then any edits you do on that file will be reflected on the auto-generated raymarching shader.

Not on my computer right now but I’ll reply shortly with more information!