Here's the same snippet as before, but I added in a bit of code demonstrating how to change different types of values:
set display mode 1024,768,32
sync on
autocam off
hide mouse
`Create sphere for the sun
SunObj=1
make object sphere SunObj,100,40,40
`Load and apply shader
SunFX=1
load effect "sun.fx",SunFX,0
set object effect SunObj,SunFX
`How to set a float
set effect constant float SunFX,"NoiseSize",5
`How to set a vector
a=make vector4(1)
set vector4 1,0,1,1,0
set effect constant vector SunFX,"HighColor",1
a=delete vector4(1)
`Create another camera to get the background image for the corona
TransparencyCam=1
make camera TransparencyCam : color backdrop TransparencyCam,rgb(0,0,128)
`Set the camera to an image we'll pass to the shader
BackgroundTex=1
set camera to image TransparencyCam,BackgroundTex,screen width(),screen height()
`Load the random texture
RandomTex=2
load image "random.dds",RandomTex
`Make sure the sun object does render in the transparency camera. We don't want it to appear in it's own background
set object mask SunObj,%01
`Texture the sun object with both textures. Background to stage 0 and random to stage 1
texture object SunObj,0,BackgroundTex
texture object SunObj,1,RandomTex
position camera 0,0,0,-200
do
set cursor 0,0
print screen fps()
control camera using arrowkeys 0,1,1
`Make sure the transparency camera moves with the main camera
position camera TransparencyCam,camera position x(0),camera position y(0),camera position z(0)
rotate camera TransparencyCam,camera angle x(0),camera angle y(0),camera angle z(0)
sync
loop
Here are the changeable values for this shader and their types:
Name - Type
HighColor - vector
LowColor - vector
FadeColor - vector
ColorFadeAmount - float
Brightness - float
SunSize - float
NoiseSize - float
NoiseSpeed - float
A note about changing colors: you might have noticed that colors are defined with numbers 0-1 for each channel: red, green, blue, and alpha. In this particular shader, the alpha channel is completely useless, so just set it to 0 or something. Other than that, you pick a color you like with some image editor, and then take each of the RGB values and divide them by 255 to get the number you should give the shader. Like in my snippet, I set the color to (0,1,1,0) (cyan) which translates to (0,255,255,0).