Skip to content
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

tex_address_mode doesn't work in pbr materials. #500

Open
taesoobear opened this issue Feb 24, 2025 · 2 comments
Open

tex_address_mode doesn't work in pbr materials. #500

taesoobear opened this issue Feb 24, 2025 · 2 comments
Labels
question Further information is requested wontfix This will not be worked on

Comments

@taesoobear
Copy link

How to reproduce: edit shadowmapFromCodeGameState.cpp and set material to the plane mesh item.

		item->setDatablockOrMaterialName("red");

Also, add a pbs material.
hlms red pbs
{
diffuse 1 1 1
specular 0 0 0
emissive 0.00000 0.00000 0.00000
tex_address_mode wrap
diffuse_map checker.png

}

I tried a few different combinations but none worked. One workaround I found was to use a .json material with a wrapping sampler block, which worked well in v2.3. But in v3, that json material didn't work on my linux laptop, and worked only on macbooks.

@darksylinc darksylinc added question Further information is requested wontfix This will not be worked on labels Feb 24, 2025
@darksylinc
Copy link
Member

Hi!

tex_address_mode is not supported in the basic material script syntax. You need to either use JSON materials or change it via C++.

One workaround I found was to use a .json material with a wrapping sampler block, which worked well in v2.3. But in v3, that json material didn't work on my linux laptop, and worked only on macbooks.

The reason it didn't work on Linux is likely that RapidJSON dependency was not found, and thus OgreNext was built without JSON support.

It looks like it didn't pick up the ogre-next-deps dependencies correctly as it was trying to build without JSON support. While this is supported, it's not recommended as many features will be left out.

Double check you're following the steps correctly so that RapidJSON is picked up from ogre-next-deps; or simply use the Quick Build Scripts.

If done correctly your CMake config options should look like this:

Image

@taesoobear
Copy link
Author

Indeed the reason was that RapidJSON was not detected. Now the json material works fine. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants