Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[?] Shader Editor / Syntax

#1
Lightbulb 
Is there some kind of GUI Editor for the .shader scripts?
Or an tutorial also explaining the syntax and list of commands/functions?

I'd really like to get a gold texture with cube-mapping.
Maybe crystal and other kind of fancy stuff. (that ambiguity)

But first I'd like to understand how it works or if theres a handy tool that fosters my laziness.
Reply

#2
I believe this is the resource I usually use: http://toolz.nexuizninjaz.com/shader/
[Image: 230.png]
Reply

#3
Thanks! That's exactly what I was looking for.

Also I should have done a google search. I was sure I already did search for 'q2 shaders' but not directly 'xonotic shader'. Well... https://forums.xonotic.org/showthread.php?tid=5667
Can be merged I guess.
Reply

#4
Shader files are plain text, so use your favorite text editor.

In regards to cubemaps for fake reflections: they work well with small size textures (256, 512), with blur applied and with some high intensity light spots.


This is the exomorph cubemap included with Xonotic (env/exomorph/exomorph):

[Image: cxEdJOM.png]



PD: If you are using Garu's NetRadiant (Windows release) then you have a local copy of the shaders manual in the Help menu.
Reply

#5
Also, you can create a cubemap -automagically- from your own map this way:

envmap <cubemapname> 512


PD: The above is a command to run in Xon console. It puts the cubemap images in ~/.xonotic/data/env
Reply

#6
Nice thanks! I think I stumbled upon this command a while ago without knowing that I could specify a name.
Are cubemaps automatically applied to the _reflect.<jpg/dds/...> map of a texture or do I have to tinker with .shader files?

Second question: Aside from using linux how did you get your gimp to look so beautifully? Maybe my version is too old(2.8) but my gimp well...

[Image: VL6Jv3D.png]

(05-12-2018, 08:08 AM)Mario Wrote: PD: If you are using Garu's NetRadiant (Windows release) then you have a local copy of the shaders manual in the Help menu.

Nice that's good to know.
Reply

#7
To apply the fake reflection provided by a cubemap, your texture need a shader directive and a texturename_reflect.tga file.

This is a shader example for a "cubemaped" metal:



Code:
textures/map_testmap2/met_copper1
{
    qer_editorImage textures/map_testmap2/metal/met_copper1.tga

    q3map_bounceScale 2.0
    dpGlossIntensityMod 0.50       // 0.70
    dpGlossExponentMod 0.25        // 2.00

    dpReflectCube env/cubemaps/exomorph

    {
        map textures/map_testmap2/metal/met_copper1.tga
        rgbGen identity
    }
    {
        map $lightmap
        rgbGen identity
        blendFunc filter
    }
}

[Image: Nob4ei5.jpg]


[Image: BCj2W21.jpg]


The _reflect file  accompanying the texture is used to indicate in wich part of the texture the effect must be applied and the intensity or amount of the effect. In the screenshots above  I'm using _reflect files of plain/flat grey (32,32,32 RGB).


Related to Gimp, yes, I'm a Linux user and I'm using the latest 2.10.4 release with the new icons and dark theme, in single-window mode (Gimp 2.8 has it in "Windows" menu) and my own layout for the tools-bar and tabs/panels, exactly as I was using it with 2.8 before.

.
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
Question [SOLVED] Breakpoint editor / Debugger? dingus 1 2,659 08-01-2016, 11:09 PM
Last Post: BuddyFriendGuy
  missing shader files BuddyFriendGuy 0 2,677 07-05-2015, 07:19 PM
Last Post: BuddyFriendGuy
  Performance Suggestion - no shaders in reflection shader master[mind] 10 11,981 11-28-2010, 04:32 PM
Last Post: Lee_Stricklin

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-