PeDev
首頁 Home
文章 Archives
標籤 Tags
作品 Portfolio
關於我 About
Embed GlslEditor in Markdown
2022-10-11 16:14:24
#
Shader
#
Web
67 words / 1-minute read
目錄 Table of contents
GlslEditor
2D Random
GlslEditor
GlslEditor by patriciogonzalezvivo
2D Random
Source code is from
TheBookOfShaders
// Author @patriciogv - 2015 // http://patriciogonzalezvivo.com #ifdef GL_ES precision mediump float; #endif uniform vec2 u_resolution; uniform vec2 u_mouse; uniform float u_time; float random (vec2 st) { return fract(sin(dot(st.xy, vec2(12.9898,78.233)))* 43758.5453123); } void main() { vec2 st = gl_FragCoord.xy/u_resolution.xy; float rnd = random( st ); gl_FragColor = vec4(vec3(rnd),1.0); }
上一頁 Prev
2022-10-11 16:14:24
#
Shader
#
Web
下一頁 Next
目錄 Table of contents
GlslEditor
2D Random
Please enable JavaScript to view the
comments powered by Disqus.