图形
webgl threejs
q871837010
这个作者很懒,什么都没留下…
展开
-
glsl 内建函数
Radians示例 :radians(360);radians(vec2(360,90));//PI//vec2(PI,PI/4)语法 :float radians(float degrees) vec2 radians(vec2 degrees) vec3 radians(vec3 degrees) vec4 radians(vec4 degrees)Degre...原创 2020-03-09 15:25:12 · 362 阅读 · 0 评论 -
glsl version 300 es 预处理
Version Declaration#version ${number} esTexture语法 :vec4 texture(sampler2D sampler, vec2 coord) vec4 texture2D(sampler2D sampler, vec2 coord, float bias)原创 2020-03-10 14:47:29 · 2554 阅读 · 0 评论 -
glsl version 300es 关键字
参考链接: GLSL_ES_Specification_3.00变量名不能要以gl_开头注释// 或 /**/关键字void float int uint boolvoid function_name(){};float var_name = 1.;uint var_name = 1u;const int numLights = 5;float lights[numL...原创 2020-03-10 16:50:22 · 820 阅读 · 0 评论 -
threejs glsl clip
clipping_planes_pars_fragment//#if NUM_CLIPPING_PLANES > 0 #if ! defined( PHYSICAL ) && ! defined( PHONG ) && ! defined( MATCAP ) varying vec3 vViewPosition; #endif uniform v...原创 2020-03-16 13:25:07 · 307 阅读 · 0 评论 -
threejs glsl(map)
alphamap_pars_fragment//透明通道贴图pars#ifdef USE_ALPHAMAP uniform sampler2D alphaMap;#endifalphamap_fragment//漫反射的透明度 main#ifdef USE_ALPHAMAP diffuseColor.a *= texture2D( alphaMap, vUv ).g;#endi...原创 2020-03-16 13:27:44 · 608 阅读 · 0 评论 -
threejs glsl(geometry)
begin_vertex//模型每个点的自身坐标vec3 transformed = vec3( position );beginnormal_vertex//模型法线vec3 objectNormal = vec3( normal );原创 2020-03-16 13:28:14 · 261 阅读 · 0 评论 -
threejs glsl(math)
bsdfs/* 获取灯光衰减后的辐照强度 * @param {float } 灯光与物体表面距离 * @param {float } 灯光最远照射距离 * @param {float } 衰减因子 * @returns {void} */float punctualLightIntensityToIrradianceFactor( const in float lightDistan...原创 2020-03-16 13:28:37 · 492 阅读 · 0 评论