用代码来画画 —— Ray-Marching(光线步进) 多个立体图形的绘制【GLSL】

 

参考自: 

iq 的 https://www.shadertoy.com/view/Xds3zN

http://www.iquilezles.org/www/articles/distfunctions/distfunctions.htm

http://www.iquilezles.org/www/articles/rmshadows/rmshadows.htm

http://ogldev.atspace.co.uk/www/tutorial13/tutorial13.html

http://9bitscience.blogspot.kr/2013/07/raymarching-distance-fields_14.html

 

用代码来画画 —— Ray-Marching(光线步进) 多个立体图形的绘制【GLSL】_第1张图片

 

 

完整代码及算法详细注释:

 

 

// Created by inigo quilez - iq/2013
// License Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

// A list of usefull distance function to simple primitives, and an example on how to
// do some interesting boolean operations, repetition and displacement.
//
// M

你可能感兴趣的:(Shader,ShaderJoy,——,Shader,实例详解)