Guest KENNITHH Posted February 29, 2016 Posted February 29, 2016 So I met this guy on SOF2 a while ago whos pretty good at shaders. He tested something which looked pretty neat but apparently, it doesn't work on NVIDIA cards.. Does this happen in JK aswell? And if so is there a way around it? Here's some more info about the shader and stuff. Shader: textures/mk_textures/multiblend_01 { qer_editorimage textures/mk_textures/multiblend_01 q3map_globaltexture { map textures/mk_textures/block_base_01 } { map textures/mk_textures/blender_01 blendFunc GL_ZERO GL_ONE_MINUS_SRC_COLOR depthWrite tcMod scale 0.25 0.25 } { map textures/mk_textures/cracks_01 blendFunc GL_ONE_MINUS_DST_ALPHA GL_DST_ALPHA depthFunc equal } { map textures/mk_textures/blender_01 blendFunc GL_ZERO GL_ONE_MINUS_SRC_COLOR depthWrite tcMod scale 0.2 0.2 } { map textures/mk_textures/sand_01 blendFunc GL_ONE_MINUS_DST_ALPHA GL_DST_ALPHA depthFunc equal } { map $lightmap blendFunc GL_DST_COLOR GL_ZERO } } What it should look like and what it looks like (notice the random sand and cracks): And apparently it has to do something with this:
AshuraDX Posted February 29, 2016 Posted February 29, 2016 never seen an issue like this before in JKA but that doesn't have to mean anything - seeing that I'm not a mappermaybe @@Szico VII knows something, if we can resurrect him or @@Xycaleth could shed some light on this
Xycaleth Posted February 29, 2016 Posted February 29, 2016 I would remove all those depthWrite and depthFunc commands. They're not necessary and can cause problems like this. textures/mk_textures/multiblend_01 { qer_editorimage textures/mk_textures/multiblend_01 q3map_globaltexture { map textures/mk_textures/block_base_01 } { map textures/mk_textures/blender_01 blendFunc GL_ZERO GL_ONE_MINUS_SRC_COLOR tcMod scale 0.25 0.25 } { map textures/mk_textures/cracks_01 blendFunc GL_ONE_MINUS_DST_ALPHA GL_DST_ALPHA } { map textures/mk_textures/blender_01 blendFunc GL_ZERO GL_ONE_MINUS_SRC_COLOR tcMod scale 0.2 0.2 } { map textures/mk_textures/sand_01 blendFunc GL_ONE_MINUS_DST_ALPHA GL_DST_ALPHA } { map $lightmap blendFunc GL_DST_COLOR GL_ZERO } }
Guest KENNITHH Posted February 29, 2016 Posted February 29, 2016 I would remove all those depthWrite and depthFunc commands. They're not necessary and can cause problems like this. Thanks for joining in in this thread, but it didn't work
Xycaleth Posted February 29, 2016 Posted February 29, 2016 Interesting Do you see any errors or warnings in the console?
Guest KENNITHH Posted February 29, 2016 Posted February 29, 2016 (edited) No, no errors at all. Here's what the maker of it said: [21:33:56] nick: yeah, well, they're necessary since i take out the alpha channel for the next texture to be blent[21:34:56] nick: so in the shader i use a blender, scale it, then write it's alpha with depthwrite for the next texture to use[21:35:23] nick: did you tell them that the shader works on ati, but not on nvidia EDIT: And apparently you're right about the depthfunc and depthwrite he said.Btw , I just tried the BSP in JKA and it doesnt work there either Edited February 29, 2016 by KENNITHH
Xycaleth Posted February 29, 2016 Posted February 29, 2016 Taking out the alpha channel doesn't stop depth from being written, even if it's completely transparent. At least I don't think it will. So yeah, possibly a bug in nvidia's drivers. I'm interested in knowing why so many stages are needed to achieve that kind of effect though? What do the texture maps look like?
AshuraDX Posted February 29, 2016 Posted February 29, 2016 Taking out the alpha channel doesn't stop depth from being written, even if it's completely transparent. At least I don't think it will. So yeah, possibly a bug in nvidia's drivers. I'm interested in knowing why so many stages are needed to achieve that kind of effect though? What do the texture maps look like?from what I understand the "blender" stages are used as masks for the detail textures
Xycaleth Posted February 29, 2016 Posted February 29, 2016 That seems unnecessary when you can use the alpha channel of the same texture though. Or better yet, add all the detail on to a separate texture and you save yourself 4 extra renders
AshuraDX Posted February 29, 2016 Posted February 29, 2016 this may not be super effective on the renderer, but this creates semi-random decals all over surfaces allowing you to create more texture variation without extra work
Nick Posted March 1, 2016 Posted March 1, 2016 Well, if there's a way to scale up the alpha channel without touching the texture holding it, that would be great! Here's how it looks on my 7770 amd http://www.hostingpics.net/viewer.php?id=5554672303.jpg http://www.hostingpics.net/viewer.php?id=6706327502.jpg http://www.hostingpics.net/viewer.php?id=7371587701.jpg No textures are scaled up except for the "blender", so the resolution stays nice. If anyone has an idea how to achieve this with full compatibility, please let me know ! Nick
Guest KENNITHH Posted March 2, 2016 Posted March 2, 2016 So I fear there is no solution to this? My idea was to use this blending for retouching original maps without the extra use of new textures or recompiling. Just shaders and new models and perhaps .ent files.
AshuraDX Posted March 2, 2016 Posted March 2, 2016 @@KENNITHH most likely a driver issue as Xycaleth said, yeah you probably won't be able to do anything about it
Guest KENNITHH Posted March 3, 2016 Posted March 3, 2016 Hm alright, a huge pitty though, it could really improve the default maps if I could use. Thanks for looking into this
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