Home
last modified time | relevance | path

Searched refs:lightDir (Results 1 – 21 of 21) sorted by relevance

/external/jmonkeyengine/engine/src/core-data/Common/MatDefs/Light/
DDeferred.frag95 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 …]
DLighting.vert83 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;
DLighting.frag254 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/
Dsimple_water.vert21 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;
DWater15.frag191 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 * …
DWater.frag189 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 * …
Dsimple_water.frag23 varying vec4 lightDir; //lightpos
63 vec4 lightTS = normalize(lightDir);
/external/jmonkeyengine/engine/src/test/jme3test/post/
DTestLightScattering.java84 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()
DTestFog.java90 Vector3f lightDir=new Vector3f(-0.37352666f, -0.50444174f, -0.7784704f); in simpleInitApp() local
91 sun.setDirection(lightDir); in simpleInitApp()
DTestPostFilters.java59 private Vector3f lightDir = new Vector3f(-1, -1, .5f).normalizeLocal(); field in TestPostFilters
94 dl.setDirection(lightDir); in setupLighting()
DTestDepthOfField.java34 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/
DLighting.glsllib19 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/
DTestPostWaterLake.java83 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()
DTestSceneWater.java86 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()
DTestPostWater.java45 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/
DTerrainLighting.vert38 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);
DTerrainLighting.frag610 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/
DTestEverything.java57 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/
DTestHoverTank.java74 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/
DTestParallax.java55 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/
DMaterial.java651 Uniform lightDir = shader.getUniform("g_LightDirection"); in updateLightListUniforms() local
654 lightDir.setVector4Length(numLights); in updateLightListUniforms()
694lightDir.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()