SlopeRampMaterial.glsl 383 B

1234567891011
  1. uniform sampler2D image;
  2. czm_material czm_getMaterial(czm_materialInput materialInput)
  3. {
  4. czm_material material = czm_getDefaultMaterial(materialInput);
  5. vec4 rampColor = texture(image, vec2(materialInput.slope / (czm_pi / 2.0), 0.5));
  6. rampColor = czm_gammaCorrect(rampColor);
  7. material.diffuse = rampColor.rgb;
  8. material.alpha = rampColor.a;
  9. return material;
  10. }