Implementing Brightskins.

Ask us questions.

Moderator: Developers

Implementing Brightskins.

Postby Christiaan » 2012-07-03 13:37:36

How would one go about implementing brightskins in a mod?

I am using the promode skins and the corresponding players.shader file.

I added the following fields to the clientinfo struct:

all of type vec4_t.

Where the models and skins are loaded, I set those fields by getting the colour characters from a cvar (cg_enemyColor "iii") and use those characters to obtain a vec4_t color from the color table.

In CG_Players, I set the shaderRGBA for the refEntities like this for the head, torso, and legs:

Code: Select all
if( cg_forceColor.integer ) {
   int i;
   for( i = 0; i < 3; i++) {
      head.shaderRGBA[i] = ci->headColor[i] * 255;

Yet the shader is not applied, in fact the model is partiall invisible, and the model keeps it's colour. Am I doing something wrong or forgetting something?
shot0000.jpg (58.52 KiB) Viewed 8360 times
Posts: 2
Joined: 2012-06-28 14:33:48

Re: Implementing Brightskins.

Postby Cyrax » 2012-07-06 08:24:48

Code: Select all
head.shaderRGBA[3] = 255; // alpha channel

Posts: 105
Joined: 2010-12-13 19:03:22

Re: Implementing Brightskins.

Postby foksieloy » 2012-07-06 23:03:36

We went through a long talk on irc, in the end it was this line (the vertex fix):

if ( atoi( vertex ) ) {
trap_Cvar_Set( "r_vertexlight", vertex );
User avatar
Site Admin
Posts: 34
Joined: 2010-12-13 18:39:11

Return to Contact

Who is online

Users browsing this forum: No registered users and 3 guests