Home
last modified time | relevance | path

Searched refs:vec3 (Results 1 – 25 of 78) sorted by relevance

1234

/external/jmonkeyengine/engine/src/core-data/Common/ShaderLib/
DCommon.glsllib1 vec3 Common_UnpackNormal(in vec3 norm){
2 return (norm * vec3(2.0)) - vec3(1.0);
5 vec3 Common_UnpackNormalLA(in vec4 norm){
6 vec3 newNorm = norm.agb;
8 return (newNorm * vec3(2.0)) - vec3(1.0);
11 vec3 Common_PackNormal(in vec3 norm){
12 return (norm * vec3(0.5)) + vec3(0.5);
DHdr.glsllib2 const vec3 lumConv = vec3(0.27, 0.67, 0.06);
4 float HDR_GetLum(in vec3 color){
12 result.rgb = vec3((Le - (floor(result.a * 255.0)) / 255.0) / 255.0);
31 vec4 HDR_LogLuvEncode(in vec3 rgb){
33 vec3 Xp_Y_XYZp = rgb * rgbToXyz;
34 Xp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));
42 vec3 HDR_LogLuvDecode(in vec4 logLuv){
44 vec3 Xp_Y_XYZp;
48 vec3 rgb = Xp_Y_XYZp * xyzToRgb;
52 vec3 HDR_ToneMap(in vec3 color, in float lumAvg, in float a, in float white){
[all …]
DLighting.glsllib10 float Lighting_Diffuse(vec3 norm, vec3 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){
21 vec3 tempVec = position.xyz * sign(posLight - 0.5) - (worldPos * posLight);
28 void Lighting_ComputePS(vec3 tanNormal, mat3 tbnMat,
29 int lightCount, out vec3 outDiffuse, out vec3 outSpecular){
31 vec3 tanViewDir = viewDir * tbnMat;
42 vec3 lightScale = g_LightColor[i].rgb * tanLightDir.w;
/external/jmonkeyengine/engine/src/core-data/Common/MatDefs/Light/
DLighting.vert24 varying vec3 AmbientSum;
26 varying vec3 SpecularSum;
28 attribute vec3 inPosition;
30 attribute vec3 inNormal;
32 varying vec3 lightVec;
43 varying vec3 vNormal;
45 //varying vec3 vPosition;
46 varying vec3 vViewDir;
54 uniform vec3 g_CameraPosition;
57 uniform vec3 m_FresnelParams;
[all …]
DDeferred.frag11 uniform vec3 m_FrustumCorner;
16 uniform vec3 g_CameraPosition;
24 float lightComputeDiffuse(in vec3 norm, in vec3 lightdir, in vec3 viewdir){
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);
52 vec3 R = reflect(-lightdir, norm);
58 vec2 computeLighting(in vec3 wvPos, in vec3 wvNorm, in vec3 wvViewDir, in vec4 wvLightDir, in float…
64 vec3 decodeNormal(in vec4 enc){
69 return nn.xyz * vec3(2.0) + vec3(0.0,0.0,-1.0);
[all …]
DLighting.frag11 varying vec3 AmbientSum;
13 varying vec3 SpecularSum;
17 //varying vec3 vPosition;
18 varying vec3 vViewDir;
20 varying vec3 lightVec;
47 varying vec3 vNormal;
75 float tangDot(in vec3 v1, in vec3 v2){
85 float lightComputeDiffuse(in vec3 norm, in vec3 lightdir, in vec3 viewdir){
95 float lightComputeSpecular(in vec3 norm, in vec3 viewdir, in vec3 lightdir, in float shiny){
101 vec3 H = (viewdir + lightdir) * vec3(0.5);
[all …]
DGBuf.frag11 varying vec3 vNormal;
30 vec2 encodeNormal(in vec3 n){
56 vec3 normal = (normalHeight.xyz * vec3(2.0) - vec3(1.0));
61 vec3 normal = vNormal;
/external/jmonkeyengine/engine/src/core-effects/Common/MatDefs/Water/
DWater.frag16 uniform vec3 m_CameraPosition;
24 uniform vec3 m_LightDir;
29 uniform vec3 m_FoamExistence;
30 uniform vec3 m_ColorExtinction;
65 mat3 computeTangentFrame(in vec3 N, in vec3 P, in vec2 UV) {
66 vec3 dp1 = dFdx(P);
67 vec3 dp2 = dFdy(P);
73 //vec3 dp1xdp2 = cross(dp1, dp2);
77 vec3 T = inverseM * vec3(duv1.x, duv2.x, 0.0);
78 vec3 B = inverseM * vec3(duv1.y, duv2.y, 0.0);
[all …]
DWater15.frag20 uniform vec3 m_CameraPosition;
28 uniform vec3 m_LightDir;
33 uniform vec3 m_FoamExistence;
34 uniform vec3 m_ColorExtinction;
70 mat3 computeTangentFrame(in vec3 N, in vec3 P, in vec2 UV) {
71 vec3 dp1 = dFdx(P);
72 vec3 dp2 = dFdy(P);
77 vec3 dp1xdp2 = cross(dp1, dp2);
80 vec3 T = inverseM * vec2(duv1.x, duv2.x);
81 vec3 B = inverseM * vec2(duv1.y, duv2.y);
[all …]
Dsimple_water.vert7 uniform vec3 m_lightPos;
13 uniform vec3 g_CameraPosition;
18 attribute vec3 inTangent;
19 attribute vec3 inNormal;
65 vec3 wvNormal = normalize(g_NormalMatrix * inNormal);
66 vec3 wvTangent = normalize(g_NormalMatrix * inTangent);
67 vec3 wvBinormal = cross(wvNormal, wvTangent);
/external/jmonkeyengine/engine/src/terrain/Common/MatDefs/Terrain/
DTerrainLighting.vert12 attribute vec3 inPosition;
13 attribute vec3 inNormal;
17 varying vec3 vNormal;
19 varying vec3 vPosition;
20 varying vec3 vnPosition;
21 varying vec3 vViewDir;
22 varying vec3 vnViewDir;
26 varying vec3 lightVec;
34 varying vec3 wNormal;
38 void lightComputeDir(in vec3 worldPos, in vec4 color, in vec4 position, out vec4 lightDir){
[all …]
DTerrainLighting.frag9 varying vec3 vNormal;
11 varying vec3 vPosition;
12 varying vec3 vnPosition;
13 varying vec3 vViewDir;
16 varying vec3 lightVec;
145 varying vec3 wNormal;
150 float tangDot(in vec3 v1, in vec3 v2){
161 float lightComputeDiffuse(in vec3 norm, in vec3 lightdir, in vec3 viewdir){
165 float lightComputeSpecular(in vec3 norm, in vec3 viewdir, in vec3 lightdir, in float shiny){
168 vec3 halfVec = normalize(viewdir + lightdir);
[all …]
DHeightBasedTerrain.frag1 uniform vec3 m_region1;
2 uniform vec3 m_region2;
3 uniform vec3 m_region3;
4 uniform vec3 m_region4;
15 varying vec3 normal;
22 vec3 blend = abs( normal );
26 blend /= vec3(b, b, b);
/external/jmonkeyengine/engine/src/networking/com/jme3/network/serializing/serializers/
DVector3Serializer.java15 Vector3f vec3 = new Vector3f(); in readObject() local
16 vec3.x = data.getFloat(); in readObject()
17 vec3.y = data.getFloat(); in readObject()
18 vec3.z = data.getFloat(); in readObject()
19 return vec3; in readObject()
23 Vector3f vec3 = (Vector3f) object; in writeObject() local
24 buffer.putFloat(vec3.x); in writeObject()
25 buffer.putFloat(vec3.y); in writeObject()
26 buffer.putFloat(vec3.z); in writeObject()
/external/jmonkeyengine/engine/src/core-effects/Common/MatDefs/SSAO/
Dssao15.frag10 uniform vec3 m_FrustumCorner;
21 vec3 getPosition(in vec2 uv){
30 return depth* vec3(x, y, m_FrustumCorner.z);
33 vec3 getNormal(in vec2 uv){
44 float doAmbientOcclusion(in vec2 tc, in vec3 pos, in vec3 norm){
45 vec3 diff = getPosition(tc)- pos;
46 vec3 v = normalize(diff);
66 vec3 position = getPosition(texCoord);
72 vec3 normal = getNormal(texCoord);
Dssao.frag6 uniform vec3 m_FrustumCorner;
19 vec3 getPosition(in vec2 uv){
28 return depth* vec3(x, y, m_FrustumCorner.z);
31 vec3 getNormal(in vec2 uv){
40 float doAmbientOcclusion(in vec2 tc, in vec3 pos, in vec3 norm){
41 vec3 diff = getPosition(tc)- pos;
42 vec3 v = normalize(diff);
74 vec3 position = getPosition(texCoord);
80 vec3 normal = getNormal(texCoord);
/external/eigen/test/
Dgeo_orthomethods.cpp45 Vector3 vec3 = Vector3::Random(); in orthomethods_3() local
48 mcross = mat3.colwise().cross(vec3); in orthomethods_3()
49 VERIFY_IS_APPROX(mcross.col(i), mat3.col(i).cross(vec3)); in orthomethods_3()
50 mcross = mat3.rowwise().cross(vec3); in orthomethods_3()
51 VERIFY_IS_APPROX(mcross.row(i), mat3.row(i).cross(vec3)); in orthomethods_3()
92 Vector3 vec3 = Vector3::Random(); in orthomethods() local
97 mcross3N = mat3N.colwise().cross(vec3); in orthomethods()
98 VERIFY_IS_APPROX(mcross3N.col(i), mat3N.col(i).cross(vec3)); in orthomethods()
102 mcrossN3 = matN3.rowwise().cross(vec3); in orthomethods()
103 VERIFY_IS_APPROX(mcrossN3.row(i), matN3.row(i).cross(vec3)); in orthomethods()
Dsparse_solvers.cpp47 DenseVector vec2 = vec1, vec3 = vec1; in sparse_solvers() local
54 m2.template triangularView<Lower>().solve(vec3)); in sparse_solvers()
59 m2.template triangularView<Upper>().solve(vec3)); in sparse_solvers()
61 m2.conjugate().template triangularView<Upper>().solve(vec3)); in sparse_solvers()
67 mm2.conjugate().template triangularView<Upper>().solve(vec3)); in sparse_solvers()
73 m2.transpose().template triangularView<Upper>().solve(vec3)); in sparse_solvers()
78 m2.transpose().template triangularView<Lower>().solve(vec3)); in sparse_solvers()
100 m2.template triangularView<Lower>().solve(vec3)); in sparse_solvers()
/external/jmonkeyengine/engine/src/core-effects/Common/MatDefs/Post/
DFXAA.frag26 vec3 FxaaPixelShader(
36 vec3 rgbNW = FxaaTex(tex, posPos.zw).xyz;
37 vec3 rgbNE = FxaaTexOff(tex, posPos.zw, OffsetVec(1,0), rcpFrame.xy).xyz;
38 vec3 rgbSW = FxaaTexOff(tex, posPos.zw, OffsetVec(0,1), rcpFrame.xy).xyz;
39 vec3 rgbSE = FxaaTexOff(tex, posPos.zw, OffsetVec(1,1), rcpFrame.xy).xyz;
41 vec3 rgbM = FxaaTex(tex, posPos.xy).xyz;
43 vec3 luma = vec3(0.299, 0.587, 0.114);
65 vec3 rgbA = (1.0/2.0) * (
68 vec3 rgbB = rgbA * (1.0/2.0) + (1.0/4.0) * (
DGammaCorrection.frag6 vec3 gamma(vec3 L,float gamma)
8 return pow(L, vec3(1.0 / gamma));
19 texVal.a = dot(texVal.rgb, vec3(0.299, 0.587, 0.114));
DGammaCorrection15.frag8 vec3 gamma(vec3 L,float gamma)
10 return pow(L, vec3(1.0 / gamma));
22 texVal.a = dot(texVal.rgb, vec3(0.299, 0.587, 0.114));
/external/jmonkeyengine/engine/src/test/jme3test/texture/
DUnshadedArray.vert2 attribute vec3 inPosition;
9 attribute vec3 inTexCoord;
10 varying vec3 texCoord1;
14 attribute vec3 inTexCoord2;
15 varying vec3 texCoord2;
Dtex3DThumb.frag10 //vec3 texC=vec3(texCoord.x,texCoord.y ,0.7);//
12 vec3 texC=vec3(fract(texCoord.x),fract(texCoord.y),(depthy*m_Rows+depthx)*m_InvDepth);//
/external/jmonkeyengine/engine/src/bullet-native/
Dcom_jme3_bullet_collision_shapes_SimplexCollisionShape.cpp84 btVector3 vec3 = btVector3(); in Java_com_jme3_bullet_collision_shapes_SimplexCollisionShape_createShape__Lcom_jme3_math_Vector3f_2Lcom_jme3_math_Vector3f_2Lcom_jme3_math_Vector3f_2() local
85 jmeBulletUtil::convert(env, vector3, &vec3); in Java_com_jme3_bullet_collision_shapes_SimplexCollisionShape_createShape__Lcom_jme3_math_Vector3f_2Lcom_jme3_math_Vector3f_2Lcom_jme3_math_Vector3f_2()
86 btBU_Simplex1to4* simplexShape = new btBU_Simplex1to4(vec1, vec2, vec3); in Java_com_jme3_bullet_collision_shapes_SimplexCollisionShape_createShape__Lcom_jme3_math_Vector3f_2Lcom_jme3_math_Vector3f_2Lcom_jme3_math_Vector3f_2()
101 btVector3 vec3 = btVector3(); in Java_com_jme3_bullet_collision_shapes_SimplexCollisionShape_createShape__Lcom_jme3_math_Vector3f_2Lcom_jme3_math_Vector3f_2Lcom_jme3_math_Vector3f_2Lcom_jme3_math_Vector3f_2() local
102 jmeBulletUtil::convert(env, vector3, &vec3); in Java_com_jme3_bullet_collision_shapes_SimplexCollisionShape_createShape__Lcom_jme3_math_Vector3f_2Lcom_jme3_math_Vector3f_2Lcom_jme3_math_Vector3f_2Lcom_jme3_math_Vector3f_2()
105 btBU_Simplex1to4* simplexShape = new btBU_Simplex1to4(vec1, vec2, vec3, vec4); in Java_com_jme3_bullet_collision_shapes_SimplexCollisionShape_createShape__Lcom_jme3_math_Vector3f_2Lcom_jme3_math_Vector3f_2Lcom_jme3_math_Vector3f_2Lcom_jme3_math_Vector3f_2()
/external/jmonkeyengine/engine/src/core-data/Common/MatDefs/Misc/
DSky.vert5 uniform vec3 m_NormalScale;
7 attribute vec3 inPosition;
8 attribute vec3 inNormal;
10 varying vec3 direction;

1234