从 3D、2D 到 XR,从互动游戏、教育、到数字孪生,Galacean 都能为你提供一站式解决方案。
Galacean Editor 是一款专为现代开发者设计的 Web 互动编辑器,丰富的功能配合简洁操作,为你的创新之路护航。
.hdr
.fbx
.glb
等主流模型资产,以及各种类型的材质文件const float PI = 3.1415926535897932384626433832795;
uniform vec3 lightDirection;
uniform vec3 lightColour;
uniform vec2 lightBias;
uniform mat4 projectionViewMatrix;
vec3 calcSpecularLighting(vec3 toCamVector, vec3 toLightVector, vec3 normal){
vec3 reflectedLightDirection = reflect(-toLightVector, normal);
float specularFactor = dot(reflectedLightDirection , toCamVector);
specularFactor = max(specularFactor,0.0);
specularFactor = pow(specularFactor, shineDamper);
return specularFactor * specularReflectivity * lightColour;
}
void main(void){
vec3 currentVertex = vec3(in_position.x, height, in_position.y);
vec3 vertex1 = currentVertex + vec3(in_indicators.x, 0.0, in_indicators.y);
vec3 vertex2 = currentVertex + vec3(in_indicators.z, 0.0, in_indicators.w);
}
*测试环境:Macbook M2 Pro, Memory 16GB, Sonoma 14.4.1
*测试环境:Macbook M2 Pro, Memory 16GB, Sonoma 14.4.1
*数据采样自支付宝「神奇海洋」项目,截止至 2024 年 5 月