《WebGL着色器入门(九)添加纹理》的评论 http://cesium.xin/wordpress/archives/webgl-texture.html 学习cesiumjs 的好地方--伐罗密 Wed, 20 Nov 2024 01:45:23 +0000 hourly 1 https://wordpress.org/?v=4.9.26 作者:pengdage110 http://cesium.xin/wordpress/archives/webgl-texture.html#comment-3414 Thu, 12 Jan 2023 09:35:36 +0000 http://cesium.xin/wordpress/?p=3223#comment-3414 同问,我也一直提示“Texture error ”,最后怎么解决的?

]]>
作者:Elusive http://cesium.xin/wordpress/archives/webgl-texture.html#comment-3092 Fri, 24 Jun 2022 00:18:41 +0000 http://cesium.xin/wordpress/?p=3223#comment-3092 uniform sampler2D u_texture_1; 引入纹理

vec2 st = gl_FragCoord.xy/u_resolution.xy; //将绘图区的坐标归一到 0.0~0.1 http://cesium.xin/wordpress/archives/webgl-basic-knowladge.html
vec4 color = texture2D(u_texture_1,st); // 读取纹理

你看一下之前的文章

]]>
作者:pop804347424 http://cesium.xin/wordpress/archives/webgl-texture.html#comment-3083 Thu, 23 Jun 2022 08:44:25 +0000 http://cesium.xin/wordpress/?p=3223#comment-3083 #ifdef GL_ES
precision mediump float;
#endif

uniform vec2 u_resolution;
uniform sampler2D u_texture_1;

void main(){
vec2 st = gl_FragCoord.xy/u_resolution.xy;
vec4 color = texture2D(u_texture_1,st);
gl_FragColor = color;
}

想麻烦你这边讲一下这段代码的含义,我在settings.json中配置了图片,可是没有效果

]]>
作者:zwy1314upupup http://cesium.xin/wordpress/archives/webgl-texture.html#comment-2182 Mon, 27 Sep 2021 02:39:57 +0000 http://cesium.xin/wordpress/?p=3223#comment-2182 vscode识别不到setting配置的图片呢,编辑器打开glsl所在的目录了,怎么回事

]]>
作者:盛国胜 http://cesium.xin/wordpress/archives/webgl-texture.html#comment-1981 Sat, 08 May 2021 14:00:48 +0000 http://cesium.xin/wordpress/?p=3223#comment-1981 不错额

]]>
作者:Elusive http://cesium.xin/wordpress/archives/webgl-texture.html#comment-1875 Tue, 02 Mar 2021 13:22:19 +0000 http://cesium.xin/wordpress/?p=3223#comment-1875 st.s st.t

]]>
作者:mengcqk http://cesium.xin/wordpress/archives/webgl-texture.html#comment-1869 Mon, 01 Mar 2021 11:53:26 +0000 http://cesium.xin/wordpress/?p=3223#comment-1869 横向和纵向代码看不出区别

]]>