/external/jmonkeyengine/engine/src/core-data/Common/MatDefs/Light/ |
D | Deferred.frag | 95 void lightComputeDir(in vec3 worldPos, in vec4 color, in vec4 position, out vec4 lightDir){ 97 lightDir.xyz = -position.xyz; 99 lightDir.xyz = position.xyz - worldPos.xyz; 100 float dist = length(lightDir.xyz); 101 lightDir.w = clamp(1.0 - position.w * dist, 0.0, 1.0); 102 lightDir.xyz /= dist; 110 lightDir.w = clamp(1.0 - position.w * dist * posLight, 0.0, 1.0); 111 lightDir.xyz = tempVec / vec3(dist); 116 lightDir = vec4(normalize(tempVec), 1.0); 134 vec4 lightDir; [all …]
|
D | Lighting.vert | 83 void lightComputeDir(in vec3 worldPos, in vec4 color, in vec4 position, out vec4 lightDir){ 89 lightDir.w = clamp(1.0 - position.w * dist * posLight, 0.0, 1.0); 90 lightDir.xyz = tempVec / vec3(dist); 92 lightDir = vec4(normalize(tempVec), 1.0); 114 vec4 lightDir; 115 lightComputeDir(wvPos, g_LightColor, wvLightPos, lightDir); 126 float diffuseFactor = lightComputeDiffuse(wvNorm, lightDir.xyz); 127 float specularFactor = lightComputeSpecular(wvNorm, wvViewDir, lightDir.xyz, m_Shininess); 129 return vec2(diffuseFactor, specularFactor) * vec2(lightDir.w)*spotFallOff;
|
D | Lighting.frag | 254 vec4 lightDir = vLightDir; 255 lightDir.xyz = normalize(lightDir.xyz); 258 vec2 light = computeLighting(normal, viewDir, lightDir.xyz) * spotFallOff;
|
/external/jmonkeyengine/engine/src/core-effects/Common/MatDefs/Water/ |
D | simple_water.vert | 21 varying vec4 lightDir; 58 lightDir.x = dot(temp, tangent); 59 lightDir.y = dot(temp, binormal); 60 lightDir.z = dot(temp, norm); 61 lightDir.w = 0.0;
|
D | Water15.frag | 191 vec3 lightDir=normalize(m_LightDir); 193 float dotSpec = saturate(dot(mirrorEye.xyz, -lightDir) * 0.5 + 0.5); 194 …specular = vec3((1.0 - fresnel) * saturate(-lightDir.y) * ((pow(dotSpec, 512.0)) * (m_Shininess * … 386 vec3 lightDir=normalize(m_LightDir); 388 float dotSpec = saturate(dot(mirrorEye.xyz, -lightDir) * 0.5 + 0.5); 389 …specular = vec3((1.0 - fresnel) * saturate(-lightDir.y) * ((pow(dotSpec, 512.0)) * (m_Shininess * …
|
D | Water.frag | 189 vec3 lightDir=normalize(m_LightDir); 191 float dotSpec = saturate(dot(mirrorEye.xyz, -lightDir) * 0.5 + 0.5); 192 …specular = vec3((1.0 - fresnel) * saturate(-lightDir.y) * ((pow(dotSpec, 512.0)) * (m_Shininess * … 376 vec3 lightDir=normalize(m_LightDir); 378 float dotSpec = saturate(dot(mirrorEye.xyz, -lightDir) * 0.5 + 0.5); 379 …specular = vec3((1.0 - fresnel) * saturate(-lightDir.y) * ((pow(dotSpec, 512.0)) * (m_Shininess * …
|
D | simple_water.frag | 23 varying vec4 lightDir; //lightpos 63 vec4 lightTS = normalize(lightDir);
|
/external/jmonkeyengine/engine/src/test/jme3test/post/ |
D | TestLightScattering.java | 84 Vector3f lightDir = new Vector3f(-0.12f, -0.3729129f, 0.74847335f); in simpleInitApp() local 85 sun.setDirection(lightDir); in simpleInitApp() 90 pssmRenderer.setDirection(lightDir); in simpleInitApp() 105 Vector3f lightPos = lightDir.multLocal(-3000); in simpleInitApp()
|
D | TestFog.java | 90 Vector3f lightDir=new Vector3f(-0.37352666f, -0.50444174f, -0.7784704f); in simpleInitApp() local 91 sun.setDirection(lightDir); in simpleInitApp()
|
D | TestPostFilters.java | 59 private Vector3f lightDir = new Vector3f(-1, -1, .5f).normalizeLocal(); field in TestPostFilters 94 dl.setDirection(lightDir); in setupLighting()
|
D | TestDepthOfField.java | 34 private Vector3f lightDir = new Vector3f(-4.9236743f, -1.27054665f, 5.896916f); field in TestDepthOfField 53 sun.setDirection(lightDir); in simpleInitApp()
|
/external/jmonkeyengine/engine/src/core-data/Common/ShaderLib/ |
D | Lighting.glsllib | 19 void Lighting_Direction(vec3 worldPos, vec4 color, vec4 position, out vec4 lightDir){ 24 lightDir.w = clamp(1.0 - position.w * dist * posLight, 0.0, 1.0); 25 lightDir.xyz = tempVec / dist;
|
/external/jmonkeyengine/engine/src/test/jme3test/water/ |
D | TestPostWaterLake.java | 83 Vector3f lightDir = new Vector3f(-0.37352666f, -0.50444174f, -0.7784704f); in simpleInitApp() local 84 sun.setDirection(lightDir); in simpleInitApp() 89 final WaterFilter water = new WaterFilter(rootNode, lightDir); in simpleInitApp()
|
D | TestSceneWater.java | 86 Vector3f lightDir=new Vector3f(-0.37352666f, -0.50444174f, -0.7784704f); in simpleInitApp() local 87 sun.setDirection(lightDir); in simpleInitApp() 97 Vector3f lightPos=lightDir.multLocal(-400); in simpleInitApp()
|
D | TestPostWater.java | 45 private Vector3f lightDir = new Vector3f(-4.9236743f, -1.27054665f, 5.896916f); field in TestPostWater 70 sun.setDirection(lightDir); in simpleInitApp() 102 water = new WaterFilter(rootNode, lightDir); in simpleInitApp() 112 LightScatteringFilter lsf = new LightScatteringFilter(lightDir.mult(-300)); in simpleInitApp()
|
/external/jmonkeyengine/engine/src/terrain/Common/MatDefs/Terrain/ |
D | TerrainLighting.vert | 38 void lightComputeDir(in vec3 worldPos, in vec4 color, in vec4 position, out vec4 lightDir){ 43 lightDir.w = clamp(1.0 - position.w * dist * posLight, 0.0, 1.0); 44 lightDir.xyz = tempVec / vec3(dist);
|
D | TerrainLighting.frag | 610 vec4 lightDir = vLightDir; 611 lightDir.xyz = normalize(lightDir.xyz); 613 vec2 light = computeLighting(vPosition, normal, vViewDir.xyz, lightDir.xyz)*spotFallOff;
|
/external/jmonkeyengine/engine/src/test/jme3test/effect/ |
D | TestEverything.java | 57 private Vector3f lightDir = new Vector3f(-1, -1, .5f).normalizeLocal(); field in TestEverything 84 bsr.setDirection(lightDir); in setupBasicShadow() 106 dl.setDirection(lightDir); in setupLighting()
|
/external/jmonkeyengine/engine/src/test/jme3test/model/ |
D | TestHoverTank.java | 74 Vector3f lightDir = new Vector3f(-0.8719428f, -0.46824604f, 0.14304268f); in simpleInitApp() local 77 dl.setDirection(lightDir); in simpleInitApp()
|
/external/jmonkeyengine/engine/src/test/jme3test/material/ |
D | TestParallax.java | 55 private Vector3f lightDir = new Vector3f(-1, -1, .5f).normalizeLocal(); field in TestParallax 70 dl.setDirection(lightDir); in setupLighting()
|
/external/jmonkeyengine/engine/src/core/com/jme3/material/ |
D | Material.java | 651 Uniform lightDir = shader.getUniform("g_LightDirection"); in updateLightListUniforms() local 654 lightDir.setVector4Length(numLights); in updateLightListUniforms() 694 … lightDir.setVector4InArray(dir2.getX(), dir2.getY(), dir2.getZ(), spotAngleCos, lightIndex); in updateLightListUniforms() 719 Uniform lightDir = shader.getUniform("g_LightDirection"); in renderMultipassLighting() local 763 lightDir.setValue(VarType.Vector4, tmpLightDirection); in renderMultipassLighting() 773 lightDir.setValue(VarType.Vector4, tmpLightDirection); in renderMultipassLighting() 792 lightDir.setValue(VarType.Vector4, tmpLightDirection); in renderMultipassLighting()
|