mirror of
https://github.com/projectM-visualizer/projectm.git
synced 2026-03-02 05:25:41 +00:00
roaming trigonometric values
git-svn-id: https://projectm.svn.sourceforge.net/svnroot/projectm/trunk@1098 6778bc44-b910-0410-a7a0-be141de4315d
This commit is contained in:
@ -306,6 +306,17 @@ std::cout<<"Cg: Initialized profile: "<<cgGetProfileString(myCgProfile)<<std::en
|
||||
|
||||
void Renderer::SetupCgVariables(CGprogram program, const Pipeline &pipeline, const PipelineContext &context)
|
||||
{
|
||||
|
||||
float slow_roam_cos[4] = { 0.5 + 0.5*cos(context.time * 0.005),0.5 + 0.5*cos(context.time * 0.008),0.5 + 0.5*cos(context.time * 0.013),0.5 + 0.5*cos(context.time * 0.022)};
|
||||
float roam_cos[4] ={ 0.5 + 0.5*cos(context.time * 0.3),0.5 + 0.5*cos(context.time * 1.3),0.5 + 0.5*cos(context.time * 5),0.5 + 0.5*cos(context.time * 20)};
|
||||
float slow_roam_sin[4] = { 0.5 + 0.5*sin(context.time * 0.005),0.5 + 0.5*sin(context.time * 0.008),0.5 + 0.5*sin(context.time * 0.013),0.5 + 0.5*sin(context.time * 0.022)};
|
||||
float roam_sin[4] ={ 0.5 + 0.5*sin(context.time * 0.3),0.5 + 0.5*sin(context.time * 1.3),0.5 + 0.5*sin(context.time * 5),0.5 + 0.5*sin(context.time * 20)};
|
||||
|
||||
cgGLSetParameter4fv(cgGetNamedParameter(program, "slow_roam_cos"), slow_roam_cos);
|
||||
cgGLSetParameter4fv(cgGetNamedParameter(program, "roam_cos"), roam_cos);
|
||||
cgGLSetParameter4fv(cgGetNamedParameter(program, "slow_roam_sin"), slow_roam_sin);
|
||||
cgGLSetParameter4fv(cgGetNamedParameter(program, "roam_sin"), roam_sin);
|
||||
|
||||
cgGLSetParameter1f(cgGetNamedParameter(program, "time"), context.time);
|
||||
cgGLSetParameter4f(cgGetNamedParameter(program, "rand_preset"), rand_preset[0], rand_preset[1],rand_preset[2],rand_preset[3]);
|
||||
cgGLSetParameter4f(cgGetNamedParameter(program, "rand_frame"), (rand()%100) * .01,(rand()%100) * .01,(rand()%100) * .01,(rand()%100) * .01);
|
||||
|
||||
@ -77,6 +77,11 @@ float blur2_max;
|
||||
float blur3_min;
|
||||
float blur3_max;
|
||||
|
||||
float4 slow_roam_cos;
|
||||
float4 roam_cos;
|
||||
float4 slow_roam_sin;
|
||||
float4 roam_sin;
|
||||
|
||||
float time;
|
||||
float4 rand_preset;
|
||||
float4 rand_frame;
|
||||
|
||||
Reference in New Issue
Block a user