//**************************************************************************/ // Copyright 2014 Autodesk, Inc. // All rights reserved. // Use of this software is subject to the terms of the Autodesk license // agreement provided at the time of installation or download, or which // otherwise accompanies this software in either electronic or hard copy form. //**************************************************************************/ #include "Common.ogsfh" uniform int gIterate = 50; uniform float gScale = 0.423; uniform float gCenterX = 0.0f; uniform float gCenterY = 0.379f; uniform float gRange = 0.05f; uniform vec3 gInColor = {0.05,0.225,0.3}; uniform vec3 gOutColorA = {0.4,0.6,0.9}; uniform vec3 gOutColorB = {1,0.8,0.1}; ///////////////////////////////////////////////////// // Pixel shader. // NOTE: This expects screen quad vertex shader output. GLSLShader PS_Mandelbrot { void main() { vec2 pos = VSUV.xy; // fract(VSUV.xy); pos.y = 1 - pos.y; float real = pos.x *gScale + (gCenterX); float imag = pos.y *gScale + (gCenterY); float Creal = real; float Cimag = imag; Creal = -0.765f; Cimag = 0.11f; float r2 = 0.0f; float i; for (i=0; (i