本文整理汇总了Java中com.badlogic.gdx.graphics.g3d.shaders.BaseShader类的典型用法代码示例。如果您正苦于以下问题:Java BaseShader类的具体用法?Java BaseShader怎么用?Java BaseShader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BaseShader类属于com.badlogic.gdx.graphics.g3d.shaders包,在下文中一共展示了BaseShader类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getUniformSet
import com.badlogic.gdx.graphics.g3d.shaders.BaseShader; //导入依赖的package包/类
private static Map.Entry<BaseShader.Uniform, BaseShader.Setter> getUniformSet(String name) {
for (Map.Entry<BaseShader.Uniform, BaseShader.Setter> entry : UNIFORMS().entrySet()) {
if(entry.getKey().alias.equals(name))
return entry;
}
return null;
}
示例2: set
import com.badlogic.gdx.graphics.g3d.shaders.BaseShader; //导入依赖的package包/类
@Override
public void set(BaseShader shader, int inputID, Renderable renderable, Attributes combinedAttributes)
{
if (com.a2client.Config.getInstance()._renderShadows)
{
shader.set(inputID, Render.toShadowMapSpace);
}
}
示例3: createShader
import com.badlogic.gdx.graphics.g3d.shaders.BaseShader; //导入依赖的package包/类
@Override
protected Shader createShader (Renderable renderable) {
if (config.vertexShader != null && config.fragmentShader != null && tempFolder != null
&& Gdx.app.getType() == ApplicationType.Desktop) {
String prefix = DefaultShader.createPrefix(renderable, config);
Gdx.files.absolute(tempFolder).child(name + ".vertex.glsl").writeString(prefix + config.vertexShader, false);
Gdx.files.absolute(tempFolder).child(name + ".fragment.glsl").writeString(prefix + config.fragmentShader, false);
}
BaseShader result = new MultiPassShader(renderable, config);
if (tempFolder != null && Gdx.app.getType() == ApplicationType.Desktop)
Gdx.files.absolute(tempFolder).child(name + ".log.txt").writeString(result.program.getLog(), false);
return result;
}
示例4: getDetectedUniformNames
import com.badlogic.gdx.graphics.g3d.shaders.BaseShader; //导入依赖的package包/类
private List<String> getDetectedUniformNames() {
List<String> names = new ArrayList<>();
Map<BaseShader.Uniform, BaseShader.Setter> uniforms = ShaderUtils.detectUniforms(vertexShaderArea.getText(), fragmentShaderArea.getText());
uniforms.keySet().forEach(u -> names.add(u.alias));
return names;
}
示例5: set
import com.badlogic.gdx.graphics.g3d.shaders.BaseShader; //导入依赖的package包/类
@Override
public void set(BaseShader shader, int inputID, Renderable renderable, Attributes combinedAttributes) {
shader.set(inputID, shader.camera.projection);
}
示例6: isGlobal
import com.badlogic.gdx.graphics.g3d.shaders.BaseShader; //导入依赖的package包/类
@Override
public boolean isGlobal(BaseShader shader, int inputID) {
return true;
}
示例7: isGlobal
import com.badlogic.gdx.graphics.g3d.shaders.BaseShader; //导入依赖的package包/类
@Override
public boolean isGlobal(BaseShader shader, int inputID) {
return false;
}
示例8: set
import com.badlogic.gdx.graphics.g3d.shaders.BaseShader; //导入依赖的package包/类
@Override
public void set(BaseShader shader, int inputID, Renderable renderable, Attributes combinedAttributes) {
if (combinedAttributes.has(Vector3Attribute.InvWavelength))
shader.set(inputID, ((Vector3Attribute) (combinedAttributes.get(Vector3Attribute.InvWavelength))).value);
}