List of usage examples for com.badlogic.gdx.graphics.g3d.attributes CubemapAttribute EnvironmentMap
long EnvironmentMap
To view the source code for com.badlogic.gdx.graphics.g3d.attributes CubemapAttribute EnvironmentMap.
Click Source Link
From source file:com.mbrlabs.mundus.commons.shaders.SkyboxShader.java
License:Apache License
@Override public void render(Renderable renderable) { // texture uniform CubemapAttribute cubemapAttribute = ((CubemapAttribute) (renderable.material .get(CubemapAttribute.EnvironmentMap))); if (cubemapAttribute != null) { set(UNIFORM_TEXTURE, cubemapAttribute.textureDescription); }// ww w .j a v a 2 s .c om // Fog Fog fog = ((MundusEnvironment) renderable.environment).getFog(); if (fog == null) { set(UNIFORM_FOG, 0); } else { set(UNIFORM_FOG, 1); set(UNIFORM_FOG_COLOR, fog.color); } renderable.meshPart.render(program); }
From source file:com.mbrlabs.mundus.commons.skybox.Skybox.java
License:Apache License
private Model createModel() { ModelBuilder modelBuilder = new ModelBuilder(); Model model = modelBuilder.createBox(1, 1, 1, new Material(new CubemapAttribute(CubemapAttribute.EnvironmentMap, cubemap)), VertexAttributes.Usage.Position); return model; }