can't create sky from an EquirectMap without a warning
See original GitHub issueSeen in Jayfella’s jme-vehicles project:
Oct 23, 2020 5:37:55 PM com.jme3.material.Material checkSetParam
WARNING: Material parameter being set: Texture with type Texture2D doesn't match definition types TextureCubeMap
This diagnostic is triggered by
SkyFactory.createSky(assetManager, "Textures/Sky/quarry_03_4k.jpg", SkyFactory.EnvMapType.EquirectMap);
in Main.java.
The resulting render looks great; I just want to eliminate the diagnostic message. I tried to work around the warning without modifying either jme3-core or the JPEG, but was unsuccessful.
Sky.j3md has
MaterialParameters {
TextureCubeMap Texture
But I can’t use “quarry_03_4k.jpg” as a TextureCubeMap
because it’s 4096x2048 (not square).
This is one case where type-checking material parameters is awkward.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
[SOLVED] COLOR_1 vertex buffer gltf emissive not implemented
So, I have several models I want to use in a scene, and they all have emissive lights in them. I noticed in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think there is a problem in the design of the material here.
The matdef wants a TextureCubeMap that should always be mapped to a samplerCube, passing anything that is not a cubemap there would be wrong by definition, this works because the Sky shader uses a macro to define Texture as a sampler2D if EQUIRECT_MAP or SPHERE_MAP are set.
Imo this is bad practice, the matdef should have two params, one for the cubemap and one for the texture2D, or be divided in two different materials.
I like the solution of 2 different material definitions for sky.