Specular/Normalmap with custom renderer
Hey, I wanted to ask something! This is my custom code for rendering OBJ meshes which works, with rethinking voxels it also recieves shadows, AO etc.
I wanted to ask, is it possible to also bind the specular and normal maps? Can the shader work with that and use it (for example for screen space reflections and normal maps)? :)
![No description](https://cdn.answeroverflow.com/1134953044505792532/image.png)
560 Replies
@IMS Hello, given your bio I thought I might ping you for this :)
Is it possible to bind the specular and normal maps alongside my rendering, aka do the shaderpack shaders have access to that?
sorry, didn't get to this
No problem, thank you for answering
The way this is supposed to work is you use AbstractTexture's, and then you can just have _s and _n variants of those textures
and Iris should just know how to use them
May I ask in which sense? In my code above I do not render like normal blocks or items
so first try adding textures/re45_s.png
any sense, it's caught at texture binding
not at blocks or entities
Yes, I have the _s and _n with new Identifier
Oh okay, I never heard about AbstractTextures, I am scrolling through the docs but I am unsure on how to use them
Nvm!
So basically:
I should do this before calling draw?
no
don't do anything with _s or _n
pretend they don't exist, just have them
Iris will grab them for you
if you're registering them, also don't do that
Oh uhm, I should just have them as files?
yep
Woah
I'm gonna give it a shot
Hmm that did not seem to work, I will provide you with my code:
First off I think this is what you meant?
![No description](https://cdn.answeroverflow.com/1135308135393935400/image.png)
yep
This is my render code:
This is all I do basically
what is NewRenderLayer.getNewLayer?