Java 类com.badlogic.gdx.graphics.g3d.shaders.BaseShader 实例源码

项目:Argent    文件:ShaderUtils.java   
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;
}
项目:origin    文件:ModelShader.java   
@Override
public void set(BaseShader shader, int inputID, Renderable renderable, Attributes combinedAttributes)
{
    if (com.a2client.Config.getInstance()._renderShadows)
    {
        shader.set(inputID, Render.toShadowMapSpace);
    }
}
项目:libgdxcn    文件:ShaderCollectionTest.java   
@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;
}
项目:amatsukaze    文件:ShaderCollectionTest.java   
@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;
}
项目:Argent    文件:ShaderForm.java   
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;
}
项目:origin    文件:ModelShader.java   
@Override
public void set(BaseShader shader, int inputID, Renderable renderable, Attributes combinedAttributes)
{
    shader.set(inputID, Skybox.skyColor.r, Skybox.skyColor.g, Skybox.skyColor.b);
}
项目:origin    文件:ModelShader.java   
@Override
public void set(BaseShader shader, int inputID, Renderable renderable, Attributes combinedAttributes)
{
    shader.set(inputID, Skybox.fogEnabled ? Skybox.fogDensity : 0f);
}
项目:origin    文件:ModelShader.java   
@Override
public void set(BaseShader shader, int inputID, Renderable renderable, Attributes combinedAttributes)
{
    shader.set(inputID, Skybox.fogGradient);
}
项目:origin    文件:ModelShader.java   
@Override
public void set(BaseShader shader, int inputID, Renderable renderable, Attributes combinedAttributes)
{
    shader.set(inputID, Render.clipNormal.x, Render.clipNormal.y, Render.clipNormal.z, Render.clipHeight);
}
项目:origin    文件:ModelShader.java   
@Override
public void set(BaseShader shader, int inputID, Renderable renderable, Attributes combinedAttributes)
{
    shader.set(inputID, 6);
}
项目:origin    文件:ModelShader.java   
@Override
public void set(BaseShader shader, int inputID, Renderable renderable, Attributes combinedAttributes)
{
    shader.set(inputID, com.a2client.Config.getInstance()._renderShadows ? ShadowBox.SHADOW_DISTANCE : -1f);
}
项目:origin    文件:ModelShader.java   
@Override
public void set(BaseShader shader, int inputID, Renderable renderable, Attributes combinedAttributes)
{
    shader.set(inputID, Skybox.sunPosition);
}
项目:gaiasky    文件:AtmosphereShader.java   
@Override
public void set(BaseShader shader, int inputID, Renderable renderable, Attributes combinedAttributes) {
    shader.set(inputID, shader.camera.projection);
}
项目:gaiasky    文件:AtmosphereShader.java   
@Override
public boolean isGlobal(BaseShader shader, int inputID) {
    return true;
}
项目:gaiasky    文件:AtmosphereShader.java   
@Override
public void set(BaseShader shader, int inputID, Renderable renderable, Attributes combinedAttributes) {
    shader.set(inputID, shader.camera.view);
}
项目:gaiasky    文件:AtmosphereShader.java   
@Override
public boolean isGlobal(BaseShader shader, int inputID) {
    return true;
}
项目:gaiasky    文件:GroundShader.java   
@Override
public boolean isGlobal(BaseShader shader, int inputID) {
    return false;
}
项目:gaiasky    文件:AtmosphereShader.java   
@Override
public boolean isGlobal(BaseShader shader, int inputID) {
    return true;
}
项目:gaiasky    文件:AtmosphereShader.java   
@Override
public void set(BaseShader shader, int inputID, Renderable renderable, Attributes combinedAttributes) {
    shader.set(inputID, shader.camera.position.x, shader.camera.position.y, shader.camera.position.z, 1.1881f / (shader.camera.far * shader.camera.far));
}
项目:gaiasky    文件:AtmosphereShader.java   
@Override
public boolean isGlobal(BaseShader shader, int inputID) {
    return true;
}
项目:gaiasky    文件:AtmosphereShader.java   
@Override
public void set(BaseShader shader, int inputID, Renderable renderable, Attributes combinedAttributes) {
    shader.set(inputID, shader.camera.direction);
}
项目:gaiasky    文件:AtmosphereShader.java   
@Override
public boolean isGlobal(BaseShader shader, int inputID) {
    return true;
}
项目:gaiasky    文件:AtmosphereShader.java   
@Override
public void set(BaseShader shader, int inputID, Renderable renderable, Attributes combinedAttributes) {
    shader.set(inputID, shader.camera.up);
}
项目:gaiasky    文件:GroundShader.java   
@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);
}
项目:gaiasky    文件:AtmosphereShader.java   
@Override
public void set(BaseShader shader, int inputID, Renderable renderable, Attributes combinedAttributes) {
    shader.set(inputID, renderable.worldTransform);
}
项目:gaiasky    文件:GroundShader.java   
@Override
public boolean isGlobal(BaseShader shader, int inputID) {
    return false;
}
项目:gaiasky    文件:AtmosphereShader.java   
@Override
public void set(BaseShader shader, int inputID, Renderable renderable, Attributes combinedAttributes) {
    shader.set(inputID, temp.set(shader.camera.view).mul(renderable.worldTransform));
}
项目:gaiasky    文件:AtmosphereShader.java   
@Override
public boolean isGlobal(BaseShader shader, int inputID) {
    return false;
}
项目:gaiasky    文件:AtmosphereShader.java   
@Override
public void set(BaseShader shader, int inputID, Renderable renderable, Attributes combinedAttributes) {
    shader.set(inputID, temp.set(shader.camera.combined).mul(renderable.worldTransform));
}
项目:gaiasky    文件:AtmosphereShader.java   
@Override
public boolean isGlobal(BaseShader shader, int inputID) {
    return false;
}
项目:gaiasky    文件:AtmosphereShader.java   
@Override
public void set(BaseShader shader, int inputID, Renderable renderable, Attributes combinedAttributes) {
    shader.set(inputID, tmpM.set(renderable.worldTransform).inv().transpose());
}
项目:gaiasky    文件:AtmosphereShader.java   
@Override
public boolean isGlobal(BaseShader shader, int inputID) {
    return false;
}
项目:gaiasky    文件:AtmosphereShader.java   
@Override
public void set(BaseShader shader, int inputID, Renderable renderable, Attributes combinedAttributes) {
    shader.set(inputID, ((AtmosphereAttribute) (combinedAttributes.get(AtmosphereAttribute.Alpha))).value);
}
项目:gaiasky    文件:AtmosphereShader.java   
@Override
public boolean isGlobal(BaseShader shader, int inputID) {
    return false;
}
项目:gaiasky    文件:AtmosphereShader.java   
@Override
public void set(BaseShader shader, int inputID, Renderable renderable, Attributes combinedAttributes) {
    shader.set(inputID, ((AtmosphereAttribute) (combinedAttributes.get(AtmosphereAttribute.CameraHeight))).value);
}
项目:gaiasky    文件:GroundShader.java   
@Override
public boolean isGlobal(BaseShader shader, int inputID) {
    return false;
}
项目:gaiasky    文件:AtmosphereShader.java   
@Override
public void set(BaseShader shader, int inputID, Renderable renderable, Attributes combinedAttributes) {
    shader.set(inputID, ((AtmosphereAttribute) (combinedAttributes.get(AtmosphereAttribute.CameraHeight2))).value);
}
项目:gaiasky    文件:AtmosphereShader.java   
@Override
public boolean isGlobal(BaseShader shader, int inputID) {
    return false;
}
项目:gaiasky    文件:AtmosphereShader.java   
@Override
public void set(BaseShader shader, int inputID, Renderable renderable, Attributes combinedAttributes) {
    shader.set(inputID, ((AtmosphereAttribute) (combinedAttributes.get(AtmosphereAttribute.OuterRadius))).value);
}
项目:gaiasky    文件:AtmosphereShader.java   
@Override
public boolean isGlobal(BaseShader shader, int inputID) {
    return false;
}