Hi all, im trying to create something similar to detail maps
but basically a detail ambient texture that tiles separately from the ambient texture. with limited documentation on material plugins my thought was to just copy the detail map code and base my detail ambient texture plugin off of that.
however i don’t actually see where the detail map stuff is being calculated in the fragment shader in the above code?
for my use case the fragment shader would just multiply the ambient texture with the detail ambient texture eg:
You will need to replace vec3(0.5) by your own code, of course.
We don’t have a predefined replacement point (like CUSTOM_FRAGMENT_BEGIN, CUSTOM_FRAGMENT_DEFINITIONS, CUSTOM_FRAGMENT_UPDATE_ALPHA, etc) for the ambient value, so I had to find a place in the sources where the code could be injected. It turns out that the ambient value is calculated before the reflectivityOutParams reflectivityOut; declaration, hence the regexp I used.