-
Notifications
You must be signed in to change notification settings - Fork 11
How to make PBR Materials working with Iris Shaders
This is for everyone. Modder that used PBR materials and Normal map for glTF models, should inform their users to watch this tutorial.
https://www.curseforge.com/minecraft/mc-mods/sodium
Run Minecraft and close it to make shaderpacks
folder exist in your Game Dir.
Choose one of the shaderpack list below, and put downloaded shaderpack into shaderpacks
folder.
https://bitslablab.com/bslshaders/
Most BSL based shaderpack will work properly with MCglTF.
https://bitslablab.com/bslshaders/#extras
In this section, you need to use the Zip Archiver you familiar to fix entity.properties
.
entity.properties
is located at shaders
of shaderpack zip file.
Extract entity.properties
for editing as describe below with the desired text editor you prefered, and then put it back into the shaderpack zip file once finish.
Find this line
entity.10100=minecraft:item_frame minecraft:painting minecraft:glow_item_frame
Remove minecraft:item_frame
and minecraft:glow_item_frame
entity.10100=minecraft:painting
What this patch done is preventing normal mapped model in the Item Frame have weird lighting result after Minecraft version 1.12.2.
This issue had been fix since BSL v8.2. You don't need to apply this patch anymore.
In this section, you need to use the Zip Archiver you familiar to fix materialGbuffers.glsl
.
materialGbuffers.glsl
is located at shaders/lib/surface/
of shaderpack zip file.
Extract materialGbuffers.glsl
for editing as describe below with the desired text editor you prefered, and then put it back into the shaderpack zip file once finish.
Replace this line
vec4 specularMap = texture2DGradARB(specular, newCoord, dcdx, dcdy);
With these line
#ifdef PARALLAX
vec4 specularMap = texture2DGradARB(specular, newCoord, dcdx, dcdy);
#else
vec4 specularMap = texture2D(specular, texCoord);
#endif
Replace this line
normalMap = texture2DGradARB(normals, newCoord, dcdx, dcdy).xyz * 2.0 - 1.0;
With these line
#ifdef PARALLAX
normalMap = texture2DGradARB(normals, newCoord, dcdx, dcdy).xyz * 2.0 - 1.0;
#else
normalMap = texture2D(normals, texCoord).xyz * 2.0 - 1.0;
#endif
Replace these line
ao = texture2DGradARB(normals, newCoord, dcdx, dcdy).z;
normalMap = vec3(texture2DGradARB(normals, newCoord, dcdx, dcdy).xy, 0.0) * 2.0 - 1.0;
With these line
#ifdef PARALLAX
ao = texture2DGradARB(normals, newCoord, dcdx, dcdy).z;
normalMap = vec3(texture2DGradARB(normals, newCoord, dcdx, dcdy).xy, 0.0) * 2.0 - 1.0;
#else
ao = texture2D(normals, texCoord).z;
normalMap = vec3(texture2D(normals, texCoord).xy, 0.0) * 2.0 - 1.0;
#endif
What this patch done is preventing Normal Map and Specular Map got shifted and stretched even when Parallax Occlusion Mapping
is turn off.
In Minecraft Options
/Video Settings
/Shaders Packs…
, select the BSL shader pack and then click Shaders Pack Settings…
.
In Shaders Pack Configure
/Material
, turn on Advanced Materials
and make sure the Material Format
match the mod that dependent on MCglTF you used. (In most case SEUS/Old PBR)
Optionally in Normals & Parallax
, if you don't like Normal Map effect fade out when looking downward in first person, you can turn off Normal Dampening
.
Now it is done. Enjoy the 3D models which provided by your Mod author that looked like it was coming from 3A Game.
https://lextermina7.wixsite.com/astralex
This patch is applied to the AstraLex Shaders v51.0 and above, similar to the issue that had been described above.
In this section, you need to use the Zip Archiver you familiar to fix gbuffers_entities.glsl
.
gbuffers_entities.glsl
is located at shaders/program/
of shaderpack zip file.
Extract gbuffers_entities.glsl
for editing as describe below with the desired text editor you prefered, and then put it back into the shaderpack zip file once finish.
Find this line
float skipAdvMat =float(entityId == 10100 || entityId == 10002 || entityId == 10312 || entityId == 10315);
Remove || entityId == 10312
float skipAdvMat =float(entityId == 10100 || entityId == 10002 || entityId == 10315);
What this patch done is preventing normal mapped model in the Item Frame have weird lighting result after Minecraft version 1.12.2.
In Minecraft Options
/Video Settings
/Shaders Packs…
, select the AstraLex Shaders pack and then click Shaders Pack Settings…
.
In Shaders Pack Configure
/Advanced Materials
, make sure Advanced Materials
is on and the Material Format
match the mod that dependent on MCglTF you used. (In most case Seus PBR (Old PBR))
Then navigate into Reflections
, turn on Specular Reflection
and Rough Reflection
.
Optionally in Shaders Pack Configure
/Advanced Materials
, if you don't like Normal Map effect fade out when looking downward in first person, you can turn off Normal Dampening
.
Now it is done. Enjoy the 3D models which provided by your Mod author that looked like it was coming from 3A Game.
https://www.complementary.dev/shaders-v4/
In Minecraft Options
/Video Settings
/Shaders Packs…
, select the Complementary Shaders pack and then click Shaders Pack Settings…
.
In Shaders Pack Configure
, change RP Support
to either labPBR (RP Required)
or SEUS PBR (RP Required)
based on the mod that dependent on MCglTF you used. (In most case SEUS PBR (RP Required))
Now it is done. Enjoy the 3D models which provided by your Mod author that looked like it was coming from 3A Game.