当前位置: 首页>>代码示例>>Java>>正文


Java BaseShader类代码示例

本文整理汇总了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;
}
 
开发者ID:ncguy2,项目名称:Argent,代码行数:8,代码来源:ShaderUtils.java

示例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);
	}
}
 
开发者ID:arksu,项目名称:origin,代码行数:9,代码来源:ModelShader.java

示例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;
}
 
开发者ID:basherone,项目名称:libgdxcn,代码行数:14,代码来源:ShaderCollectionTest.java

示例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;
}
 
开发者ID:ncguy2,项目名称:Argent,代码行数:7,代码来源:ShaderForm.java

示例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);
}
 
开发者ID:langurmonkey,项目名称:gaiasky,代码行数:5,代码来源:AtmosphereShader.java

示例6: isGlobal

import com.badlogic.gdx.graphics.g3d.shaders.BaseShader; //导入依赖的package包/类
@Override
public boolean isGlobal(BaseShader shader, int inputID) {
    return true;
}
 
开发者ID:langurmonkey,项目名称:gaiasky,代码行数:5,代码来源:AtmosphereShader.java

示例7: isGlobal

import com.badlogic.gdx.graphics.g3d.shaders.BaseShader; //导入依赖的package包/类
@Override
public boolean isGlobal(BaseShader shader, int inputID) {
    return false;
}
 
开发者ID:langurmonkey,项目名称:gaiasky,代码行数:5,代码来源:GroundShader.java

示例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);
}
 
开发者ID:langurmonkey,项目名称:gaiasky,代码行数:6,代码来源:GroundShader.java


注:本文中的com.badlogic.gdx.graphics.g3d.shaders.BaseShader类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。