-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Finish modularizing PBRTerrain.j3md #2369
Conversation
Previously I only modularized AdvnacedPBRTerrain.j3md But now this PR applies the same concept to PBRTerrain.j3md I ended up deleting the PBRTerrain.frag file, so now both of the terrain's .j3md files reference the same fragment shader, but the advanced version has a boolean called UseTextureArrays set to true to tell the fragment shader to read from texture arrays instead of normal textures. I also added suppor for metallicRoughnessAoEi maps in the regular PRRTerrain shader (Ao being ambient occlusion that is packed in blue channel, and Ei being emissiv intensity which gets packed in the alpha channel). You will still be limited to 16 textures without using texture arrays, and as always I'd suggest most people juts use the advanced version of the shader primarily, but atleast the option is there.
I made a dumb mistake on my end, and I accidentally made a commit to PBRTerraiUtils.glsllib without making a PR first.... So please also take a look at this commit while reviewing this PR: I apologize for this mistake. I'm still learning certain aspects of the github interface, so I'm not sure if there is an easy way to revert a commit. If so, let me know and I'll fix it so that commit is reverted and instead added to this PR. |
To revert a commit, I'd use the "gitk" tool, not to be confused with "GitKraken". https://git-scm.com/docs/gitk for more info about "gitk". Gitk makes reverting a simple procedure. Make sure the relevant branch ("master" in this case) is checked out. Select the commit using the Left Mouse Button, then pull down with the Right Mouse Button and select "Revert This Commit" from the pulldown menu. Then push the branch to "origin". Or I can do this to 5089672 for you if you'd like. |
Yes if its not too much of a hassle, that would be helpful. I looked through the doc you linked but I may be another few days until I'm feeling better from being sick before I get back to working on finishing this PR up and cutting the next release. |
For some reason, my changes that I made to PBRTerrainUtils.glsllib are not showing up... the changes are there in the branch I'm using for this PR, but its not detecting changes when I look at that file compared to jme's master branch. I think I glitched something out wit this PR when I made that one commit directly, so I just went ahead and remade this whole PR: #2377 |
Previously I only modularized AdvnacedPBRTerrain.j3md
But now this PR applies the same concept to PBRTerrain.j3md
I ended up deleting the PBRTerrain.frag file, so now both of the terrain's .j3md files reference the same fragment shader, but the advanced version has a boolean called UseTextureArrays set to true to tell the fragment shader to read from texture arrays instead of normal textures.
I also added suppor for metallicRoughnessAoEi maps in the regular PRRTerrain shader (Ao being ambient occlusion that is packed in blue channel, and Ei being emissiv intensity which gets packed in the alpha channel). You will still be limited to 16 textures without using texture arrays, and as always I'd suggest most people juts use the advanced version of the shader primarily, but atleast the option is there.