Two q3map_materials for dotproduct2 shader? -1 reply

Please wait...


The Internet ends at GF

50 XP

16th August 2008

0 Uploads

136 Posts

0 Threads

#1 9 years ago

Here's what I want: a dotproduct2 shader that will apply q3map_material Grass when it is majority primary texture and q3map_material Dirt when it is majority secondary texture. I already have a working dp2 shader something like this

textures/test/dp2 { shader shader q3map_material Mud { map textures/test/grass blend } { map textures/test/dirt blend } }

This works fine. However, there is only one q3map_material. When I try two like this:

textures/test/dp2 { shader shader { map textures/test/grass blend q3map_material Grass } { map textures/test/dirt blend q3map_material Dirt } }

It doesn't like it and displays grey squares with white borders.

Anyone know how to do this?



50 XP

8th October 2005

0 Uploads

6,921 Posts

0 Threads

#2 9 years ago

q3map_material is a shader parameter. You cannot apply it to a texture - it has to apply to the entire shader. In the first example you posted, it does - but in the second example, both parameters are in the wrong spot and so the game will not recognize them.