Go Back   UnKnoWnCheaTs - Multiplayer Game Hacks and Cheats > First-Person Shooters > Other FPS Games > Quake Series > Quake Live

- Sponsored Advertisement -
http://www.myfpscheats.com/

Welcome to the UnKnoWnCheaTs - Multiplayer Game Hacks and Cheats.
You have to register before you can post and see and access any of the advanced forum features, please click the register link to proceed to the registration form. To start viewing threads or posts, select a forum that you want to visit from the selection below.
Quake Live
hacks cheats tutorials downloads source code
You are Unregistered, please register to gain Full access.    
Reply
 
Thread Tools

Dynamic Shaders
Old 11-03-2009, 03:16 AM   #1
n00bie

stealth93's Avatar

Join Date: Sep 2009
Posts: 22
Reputation: 2534
Rep Power: 55
stealth93 is a legend in the cheating communitystealth93 is a legend in the cheating communitystealth93 is a legend in the cheating communitystealth93 is a legend in the cheating communitystealth93 is a legend in the cheating communitystealth93 is a legend in the cheating communitystealth93 is a legend in the cheating communitystealth93 is a legend in the cheating communitystealth93 is a legend in the cheating communitystealth93 is a legend in the cheating communitystealth93 is a legend in the cheating community
Points: 3,165, Level: 5
Points: 3,165, Level: 5 Points: 3,165, Level: 5 Points: 3,165, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Last Achievements
Dynamic Shaders

After looking through tr_shader.c from the Q3 source I noticed that s_shaderText is a string of all the shaders loaded from the pk3s by the game. To add our own shader defitions all we need to do concatenate our dynamic shaders to this string before registering our local shaders.

Example:
Code:
// Offset is for linux v1.0.263

strcat(*((char **)(quakeLiveLibAddress + 0x315500)), "\nbottom\n{\ndeformVertexes \
wave 100 sin 0 0 0 0\n{\nblendfunc GL_SRC_ALPHA GL_SRC_ALPHA\nmap *white\n \
rgbGen entity\n}\n}\ntop\n{\ndeformVertexes wave 100 sin 0 0 0 0\n{\nmap *white\n \
rgbGen entity\n}\n}\n");

qlhShader_top = orig_RE_RegisterShader("top");
qlhShader_bottom = orig_RE_RegisterShader("bottom");
A printf of s_shaderText to console after concatenating:
Code:
.
.
.
textures/sfx2/jumppad_q1metal7_98
{
qer_editorimage textures/sfx2/bouncepad_q1metal7_98.tga
surfaceparm nodamage
q3map_lightimage textures/sfx/jumppadsmall.tga
q3map_surfacelight 1000
nopicmip
{
map textures/sfx2/bouncepad_q1metal7_98.tga
rgbGen identity
}
{
map $lightmap
rgbGen identity
blendfunc gl_dst_color gl_zero
}
{
map textures/sfx/bouncepad01b_layer1.tga
blendfunc gl_one gl_one
rgbGen wave sin .5 .5 0 1.5
}
{
clampmap textures/sfx/jumppadsmall.tga
blendfunc gl_one gl_one
tcMod stretch sin 1.2 .8 0 1.5
rgbGen wave square .5 .5 .25 1.5
}
}
bottom
{
deformVertexes wave 100 sin 0 0 0 0
{
blendfunc GL_SRC_ALPHA GL_SRC_ALPHA
map *white
rgbGen entity
}
}
top
{
deformVertexes wave 100 sin 0 0 0 0
{
map *white
rgbGen entity
}
}
Its there!
Example in action attached. This should work for other Q3 based games aswell.
Attached Thumbnails
Dynamic Shaders-quakelive.jpg  

Last edited by stealth93; 11-03-2009 at 04:47 AM. Reason: Forgot the pic
stealth93 is online now

Reply With Quote


Old 11-03-2009, 03:32 AM   #2
Retired Admin

learn_more's Avatar

Join Date: Sep 2006
Posts: 5,249
Reputation: 93628
Rep Power: 1106
learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!
Recognitions:
Members who have contributed financial support towards UnKnoWnCheaTs. Donation (2)
sieg heil Nazi
Points: 70,490, Level: 39
Points: 70,490, Level: 39 Points: 70,490, Level: 39 Points: 70,490, Level: 39
Activity: 24.7%
Activity: 24.7% Activity: 24.7% Activity: 24.7%
Last Achievements
Award-Showcase
nice finding this

for example ET has a LoadDynamicShader function:
[ET]engine chams

o lol from 10 rep to 224
__________________
learn_more is offline

Reply With Quote

Old 11-03-2009, 04:48 AM   #3
n00bie

stealth93's Avatar

Threadstarter
Join Date: Sep 2009
Posts: 22
Reputation: 2534
Rep Power: 55
stealth93 is a legend in the cheating communitystealth93 is a legend in the cheating communitystealth93 is a legend in the cheating communitystealth93 is a legend in the cheating communitystealth93 is a legend in the cheating communitystealth93 is a legend in the cheating communitystealth93 is a legend in the cheating communitystealth93 is a legend in the cheating communitystealth93 is a legend in the cheating communitystealth93 is a legend in the cheating communitystealth93 is a legend in the cheating community
Points: 3,165, Level: 5
Points: 3,165, Level: 5 Points: 3,165, Level: 5 Points: 3,165, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Last Achievements
Quote:
Originally Posted by learn_more View Post
Actually that thread is what made me go looking, thanks!
stealth93 is online now

Reply With Quote
Reply  

  • Submit Thread to Digg
  • Submit Thread to del.icio.us
  • Submit Thread to StumbleUpon
  • Submit Thread to Google
  • Submit Thread to Facebook
  • Submit Thread to My Yahoo!
  • Submit Thread to MySpace
  • Submit Thread to Twitter
  • Submit Thread to Reddit

« Structs | QL Info »


Tags
dynamic, shaders
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT +1. The time now is 04:47 PM.