Sha256: 67a6737c0220462e457aaccc269aa349c118ffc0eae10bc4659bfbcedb136559
Contents?: true
Size: 565 Bytes
Versions: 19
Compression:
Stored size: 565 Bytes
Contents
uniform vec4 color; uniform vec4 rimColor; uniform float width; czm_material czm_getMaterial(czm_materialInput materialInput) { czm_material material = czm_getDefaultMaterial(materialInput); // See http://www.fundza.com/rman_shaders/surface/fake_rim/fake_rim1.html float d = 1.0 - dot(materialInput.normalEC, normalize(materialInput.positionToEyeEC)); float s = smoothstep(1.0 - width, 1.0, d); material.diffuse = color.rgb; material.emission = rimColor.rgb * s; material.alpha = mix(color.a, rimColor.a, s); return material; }
Version data entries
19 entries across 19 versions & 1 rubygems