Artemis Posted May 31, 2013 Share Posted May 31, 2013 I have looked through the Q3 Shader Manual multiple times already, but I'm still confused. I need a shiny wall shader for something a friend and I are working on, though for right now I'm just working with a random texture and a glass shader, trying to give it the shiny appearance. In my base folder, I have textures/derp/metalshine, which is the texture I'm wanting to use. There's also a derp.shader in the shaders folder, and I added the name to the shaderlist.txt. This is what I'm working with from the glass shader: textures/derp/env_metal <- (Is that even right, to begin with?){ qer_editorimage textures/common/etest4 surfaceparm forcefield q3map_nolightmap q3map_onlyvertexlighting { map textures/derp/metalshine rgbGen vertex } { map textures/common/environ9a blendFunc GL_ONE GL_ONE rgbGen const ( 0.439216 0.439216 0.439216 ) tcGen environment tcMod scale 0.25 0.25 }} The thing is, when I try and open the env_metal in ShaderEd, it gives me an error that says it can't find textures/derp/metalshine. Until something else comes up, that would be the root of the problem. Link to comment
Syko Posted May 31, 2013 Share Posted May 31, 2013 What I've done in the past with shaders is to copy someone else's shader text (sue me) and replace the textures with mine. Look through some of Sith-J-Cull's maps and if there's an effect you like, see if you can find the corresponding shader and use that. BTW, I believe that your texture file entries (ex. env_metal) need to have a file extension with them. Link to comment
mrwonko Posted May 31, 2013 Share Posted May 31, 2013 You'll probably want a lightmap. q3map_nolightmap prevents generating one during compilation and lack of a map $lightmap stage prevents using one. Shaders are very close to the hardware - you basically need to learn a lot about how graphics cards work in order to be able to properly write them: Blending, depth tests, what purpose alpha sorting has (note that the Quake 3 engine does not alpha sort). I've only recently started to fully understand them, and I've been mapping for over 10 years. Link to comment
Artemis Posted June 1, 2013 Author Share Posted June 1, 2013 Are the textures in question inside a pk3? Or in a folder in base? I.e, base/textures/derp/metalshine. Also, ShaderEd is kind of a piece of shit. Does the shader at least work in game?Nope, the textures are just in base/textures/derp now, which I just discovered does not work... I had a couple in a .pk3 earlier, and those were working up until I took the .pk3 out.I did test the shader after redoing the .pk3, and it still doesn't work in game. Link to comment
Szico VII Posted June 2, 2013 Share Posted June 2, 2013 When you say doesnt work do you mean Grey and white squares or normal texture but with no effect? Link to comment
Artemis Posted June 2, 2013 Author Share Posted June 2, 2013 When you say doesnt work do you mean Grey and white squares or normal texture but with no effect?In game, I'm getting the gray and white. In GTK, I see the right texture... :/ Link to comment
Agent Jones Posted June 2, 2013 Share Posted June 2, 2013 I have exactly the same problem with a custom water shader. Link to comment
Artemis Posted June 2, 2013 Author Share Posted June 2, 2013 I have exactly the same problem with a custom water shader. Yay, it's not just me! If you have the shader file in both a PK3 and the base/shaders folder, make sure they are exactly current. Meaning, both are the version of the shader you wish used.I'm positive that they're current and the same. Link to comment
Artemis Posted June 20, 2013 Author Share Posted June 20, 2013 Well, after fiddling with shaders on models and doing some utterly nonproductive modding, I woke up this morning and realized that my whole code was screwy. Fixed the code, updated the .pk3 and such, and still nothing. But I at least got an error in the console... my metal image was the wrong size. -.- Fixed that, updated everything, and it works! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now