CLEO Shader API - Introduction
yes, exactly as it sounds. and No I'm not using MTA for this...
first, the autor of this CLEO Shader-API is DK22Pac
you can follow the link, and you will find basic information. unfortunately is not quite enough. :/
that's why I'm going to talk about this, in this week.
here you can see what I have done with this;
unfortunately, these shaders, are limited. We can't apply shaders to specific model or textures. :/
this CLEO Shader API use HLSL(High Level Shader Language) shaders with CLEO scripts. So, to create our own effect, is absolutely necessary known about that.
if you don't know anything, you can start searching tutorials about HLSL.
now, here are the SEMANTICS that are supported by the API
let's talk about CLEO
CLEO Shader API is based on Shader class. its interface has the following methods:
and that's all... the Autor also gives a simple example about their use..
but I will talk about EXAMPLES during this week.
and I will upload all the shaders that I created. ;) (watch my video)
;)
first, the autor of this CLEO Shader-API is DK22Pac
you can follow the link, and you will find basic information. unfortunately is not quite enough. :/
that's why I'm going to talk about this, in this week.
here you can see what I have done with this;
unfortunately, these shaders, are limited. We can't apply shaders to specific model or textures. :/
this CLEO Shader API use HLSL(High Level Shader Language) shaders with CLEO scripts. So, to create our own effect, is absolutely necessary known about that.
if you don't know anything, you can start searching tutorials about HLSL.
now, here are the SEMANTICS that are supported by the API
Type SemanticName Descriptionand when defining a variable for a parameter is necesary use shared specificator;
texture SCREEN_TEX frame buffer texture
texture DEPTH_TEX z-buffer texture
float3 SUN_CORONA_COL sun's corona color
float3 SUN_CORE_COL sun's core color
float3 SKY_TOP_COL
float3 SKY_BOTTOM_COL
float3 AMBIENT_COL
float2 SUN_POSN sun position (screen-space coordinates)
float SUN_SIZE
float DAYNIGHT_STATE
float WEATHER_FOGGYNESS
float WEATHER_CLOUD_COVERAGE
float WEATHER_RAIN
float WEATHER_UNDER_WATERNESS
int MULTISAMPLE_LEVELS AA level in game menu
bool NIGHT_VISION
bool INFRARED_VISION
bool HEAT_VISUALS
shared float2 sunPosn : SUN_POSN;and if you want to draw full/half screen as I show in the video. use following parameters
SCREEN_BASE_Xand that's basically all the information that gives the Autor about the API.
SCREEN_BASE_Y
SCREEN_SIZE_X
SCREEN_SIZE_Y
SCREEN_HALF_X
SCREEN_HALF_Y
let's talk about CLEO
CLEO Shader API is based on Shader class. its interface has the following methods:
Load("FileName%v")all these lines, are the OPCODES that can be used in Sanny Builder with this API
Loads shader (effect) from file and returns shader's handle
Draw("Shader%h" "Technique%v" "Left%f" "Top%f" "Right%f" "Bottom%f")
Draws rect with shader's technique
DrawHudElement("Shader%h" "Technique%v" "Left%f" "Top%f" "Right%f" "Bottom%f")
Draws rect with shader's technique at HUD rendering
SetFloat("Shader%h" "ParamName%v" "Value%f")
Sets float param
SetInt("Shader%h" "ParamName%v" "Value%i")
Sets integer param
SetBool("Shader%h" "ParamName%v" "Value%b")
Sets boolean param
SetVector("Shader%h" "ParamName%v" "X%f" "Y%f" "Z%f" "W%f")
Sets vector param
SetMatrix("Shader%h" "ParamName%v" "Matrix%h")
Sets matrix param. Second parameter is a pointer to D3DMATRIX struct.
SetTexture("Shader%h" "ParamName%v" "TextureName%v")
Sets texture param. Second parameter is name of texture loaded with LoadTexture() method.
SetRwTexture("Shader%h" "ParamName%v" "Texture%h")
Sets texture param. Second parameter is a pointer to RwTexture object.
LoadTexture("Name%v" "FileName%v")
Loads texture from file
UnloadTexture("Name%v")
Unloads texture
and that's all... the Autor also gives a simple example about their use..
but I will talk about EXAMPLES during this week.
and I will upload all the shaders that I created. ;) (watch my video)
;)
Comentarios
Publicar un comentario