/external/jmonkeyengine/engine/src/core-data/Common/ShaderLib/ |
Lighting.glsllib | 10 float Lighting_Diffuse(vec3 norm, vec3 lightdir){
11 return max(0.0, dot(norm, lightdir));
14 float Lighting_Specular(vec3 norm, vec3 viewdir, vec3 lightdir, float shiny){
15 vec3 refdir = reflect(-lightdir, norm);
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/core-data/Common/MatDefs/Light/ |
Deferred.frag | 24 float lightComputeDiffuse(in vec3 norm, in vec3 lightdir, in vec3 viewdir){
26 float NdotL = max(0.0, dot(norm, lightdir));
30 return max(0.0, dot(norm, lightdir));
34 float lightComputeSpecular(in vec3 norm, in vec3 viewdir, in vec3 lightdir, in float shiny){
38 vec3 H = (viewdir + lightdir) * vec3(0.5);
43 vec3 halfVec = normalize(viewdir + lightdir);
46 float NdotL = max(0.001, tangDot(norm, lightdir));
52 vec3 R = reflect(-lightdir, norm);
95 void lightComputeDir(in vec3 worldPos, in vec4 color, in vec4 position, out vec4 lightDir){
97 lightDir.xyz = -position.xyz; [all...] |
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);
97 float lightComputeDiffuse(in vec3 norm, in vec3 lightdir){
98 return max(0.0, dot(norm, lightdir));
101 float lightComputeSpecular(in vec3 norm, in vec3 viewdir, in vec3 lightdir, in float shiny){
106 vec3 H = (viewdir + lightdir) * vec3(0.5);
114 vec4 lightDir;
115 lightComputeDir(wvPos, g_LightColor, wvLightPos, lightDir);
[all...] |
Lighting.frag | 85 float lightComputeDiffuse(in vec3 norm, in vec3 lightdir, in vec3 viewdir){
87 float NdotL = max(0.0, dot(norm, lightdir));
91 return max(0.0, dot(norm, lightdir));
95 float lightComputeSpecular(in vec3 norm, in vec3 viewdir, in vec3 lightdir, in float shiny){
101 vec3 H = (viewdir + lightdir) * vec3(0.5);
105 vec3 halfVec = normalize(viewdir + lightdir);
108 float NdotL = max(0.001, tangDot(norm, lightdir));
114 vec3 R = reflect(-lightdir, norm);
254 vec4 lightDir = vLightDir;
255 lightDir.xyz = normalize(lightDir.xyz); [all...] |
/external/jmonkeyengine/engine/src/core-effects/Common/MatDefs/Water/ |
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;
|
Water.j3md | 19 Vector3 LightDir
|
simple_water.frag | 23 varying vec4 lightDir; //lightpos 63 vec4 lightTS = normalize(lightDir);
|
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 * 1.8 + 0.2)));
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 * 1.8 + 0.2)));
|
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 * 1.8 + 0.2)));
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 * 1.8 + 0.2)));
|
/external/jmonkeyengine/engine/src/test/jme3test/material/ |
TestParallax.java | 55 private Vector3f lightDir = new Vector3f(-1, -1, .5f).normalizeLocal(); 70 dl.setDirection(lightDir); 168 // lightDir.set(FastMath.sin(time), -1, FastMath.cos(time)); 169 // bsr.setDirection(lightDir); 170 // dl.setDirection(lightDir);
|
/external/jmonkeyengine/engine/src/terrain/Common/MatDefs/Terrain/ |
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);
|
TerrainLighting.frag | 161 float lightComputeDiffuse(in vec3 norm, in vec3 lightdir, in vec3 viewdir){
162 return max(0.0, dot(norm, lightdir));
165 float lightComputeSpecular(in vec3 norm, in vec3 viewdir, in vec3 lightdir, in float shiny){
168 vec3 halfVec = normalize(viewdir + lightdir);
171 float NdotL = max(0.001, tangDot(norm, lightdir));
177 vec3 R = reflect(-lightdir, norm);
610 vec4 lightDir = vLightDir;
611 lightDir.xyz = normalize(lightDir.xyz);
613 vec2 light = computeLighting(vPosition, normal, vViewDir.xyz, lightDir.xyz)*spotFallOff; [all...] |
/external/jmonkeyengine/engine/src/test/jme3test/post/ |
TestLightScattering.java | 84 Vector3f lightDir = new Vector3f(-0.12f, -0.3729129f, 0.74847335f); 85 sun.setDirection(lightDir); 90 pssmRenderer.setDirection(lightDir); 105 Vector3f lightPos = lightDir.multLocal(-3000);
|
TestFog.java | 90 Vector3f lightDir=new Vector3f(-0.37352666f, -0.50444174f, -0.7784704f); 91 sun.setDirection(lightDir);
|
TestPostFilters.java | 59 private Vector3f lightDir = new Vector3f(-1, -1, .5f).normalizeLocal(); 94 dl.setDirection(lightDir);
|
TestDepthOfField.java | 34 private Vector3f lightDir = new Vector3f(-4.9236743f, -1.27054665f, 5.896916f); 53 sun.setDirection(lightDir);
|
/external/jmonkeyengine/engine/src/test/jme3test/model/ |
TestHoverTank.java | 74 Vector3f lightDir = new Vector3f(-0.8719428f, -0.46824604f, 0.14304268f); 77 dl.setDirection(lightDir);
|
/frameworks/base/tests/RenderScriptTests/SceneGraph/src/com/android/scenegraph/ |
Float4Param.java | 126 } else if(mParamName.startsWith(lightDir) && findLight(lightDir)) {
|
ShaderParam.java | 44 static final String lightDir = "lightDir";
|
/external/jmonkeyengine/engine/src/test/jme3test/water/ |
TestPostWaterLake.java | 83 Vector3f lightDir = new Vector3f(-0.37352666f, -0.50444174f, -0.7784704f); 84 sun.setDirection(lightDir); 89 final WaterFilter water = new WaterFilter(rootNode, lightDir);
|
TestSceneWater.java | 86 Vector3f lightDir=new Vector3f(-0.37352666f, -0.50444174f, -0.7784704f); 87 sun.setDirection(lightDir); 97 Vector3f lightPos=lightDir.multLocal(-400);
|
TestPostWater.java | 45 private Vector3f lightDir = new Vector3f(-4.9236743f, -1.27054665f, 5.896916f); 70 sun.setDirection(lightDir); 102 water = new WaterFilter(rootNode, lightDir); 112 LightScatteringFilter lsf = new LightScatteringFilter(lightDir.mult(-300));
|
/external/jmonkeyengine/engine/src/test/jme3test/effect/ |
TestEverything.java | 57 private Vector3f lightDir = new Vector3f(-1, -1, .5f).normalizeLocal(); 84 bsr.setDirection(lightDir); 106 dl.setDirection(lightDir);
|
/external/jmonkeyengine/engine/src/core/com/jme3/material/ |
Material.java | 651 Uniform lightDir = shader.getUniform("g_LightDirection"); 654 lightDir.setVector4Length(numLights); 694 lightDir.setVector4InArray(dir2.getX(), dir2.getY(), dir2.getZ(), spotAngleCos, lightIndex); 719 Uniform lightDir = shader.getUniform("g_LightDirection"); 763 lightDir.setValue(VarType.Vector4, tmpLightDirection); 773 lightDir.setValue(VarType.Vector4, tmpLightDirection); 792 lightDir.setValue(VarType.Vector4, tmpLightDirection); [all...] |
/external/jmonkeyengine/engine/src/core-effects/com/jme3/water/ |
WaterFilter.java | 274 material.setVector3("LightDir", lightDirection); 518 material.setVector3("LightDir", lightDirection); [all...] |