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

WARNING: Fixed function technique 'Default' was ignored for material Common/MatDefs/Terrain/HeightBasedTerrain.j3md #2300

Open
capdevon opened this issue Aug 14, 2024 · 1 comment

Comments

@capdevon
Copy link
Contributor

capdevon commented Aug 14, 2024

When assigning Material HeightBasedTerrain.j3md to a Terrain, the following log message appears on the console during application startup:

Material mat = new Material(assetManager, "Commons/MatDefs/Terrain/HeightBasedTerrain.j3md");
...
Terrain terrain = ...;
terrain.setMaterial(mat);
ago 14, 2024 5:41:37 PM com.jme3.material.plugins.J3MLoader readTechnique
WARNING: Fixed function technique was ignored
ago 14, 2024 5:41:37 PM com.jme3.material.plugins.J3MLoader readTechnique
WARNING: Fixed function technique 'Default' was ignored for material Common/MatDefs/Terrain/HeightBasedTerrain.j3md

In fact, the definition of a technique in the HeightBasedTerrain.j3md file is incomplete and I believe it can be removed.
By removing the empty technique block, the warning log message no longer appears.

If you agree, I will create a PR.

Here is the corrected file:

MaterialDef Terrain {

	MaterialParameters {
		...
	}

	Technique {
		VertexShader GLSL100:   MatDefs/Terrain/HeightBasedTerrain.vert
		FragmentShader GLSL100: MatDefs/Terrain/HeightBasedTerrain.frag

		WorldParameters {
			WorldViewProjectionMatrix
			WorldMatrix
			NormalMatrix
		}
	}

	// -- This definition block can be removed
	//Technique {
	//}

}

Edit:
The same problem appears in the Terrain.j3md file

@stephengold
Copy link
Member

Thanks for documenting the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants