Sha256: db808ad685d0ce721932c6cd5e2d3f54b64a77bfeeb8b6e81c4299579b289fdd

Contents?: true

Size: 945 Bytes

Versions: 3

Compression:

Stored size: 945 Bytes

Contents

uniform float u_morphTime;

varying vec3 v_positionMC;
varying vec3 v_positionEC;
varying vec2 v_textureCoordinates;

void main()
{
    czm_materialInput materialInput;
    
    // TODO: Real 1D distance, and better 3D coordinate
    materialInput.st = v_textureCoordinates;
    materialInput.str = vec3(v_textureCoordinates, 0.0);
    materialInput.positionMC = v_positionMC;
    
    //Convert tangent space material normal to eye space
    materialInput.normalEC = normalize(czm_normal3D * czm_geodeticSurfaceNormal(v_positionMC, vec3(0.0), vec3(1.0)));
    materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(v_positionMC, materialInput.normalEC);
    
    //Convert view vector to world space
    vec3 positionToEyeEC = -v_positionEC; 
    materialInput.positionToEyeEC = positionToEyeEC;

    czm_material material = czm_getMaterial(materialInput);
    
    gl_FragColor = czm_phong(normalize(positionToEyeEC), material);
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cesium-0.15.0 app/assets/javascripts/Shaders/PolygonFS.glsl
cesium-0.14.0 app/assets/javascripts/Shaders/PolygonFS.glsl
cesium-0.13.2 app/assets/javascripts/Shaders/PolygonFS.glsl