Jump to content
The Dark Mod Forums

Newbie OpenGL Questions


ungoliant

Recommended Posts

So why would these images be reliable enough to feed a fragment program that must get redrawn depending on view yet not be reliable enough as a material stage input?

 

If "_scratch" is useless in a material it must also be useless for a fragment program.

 

There must be a way to fill "_scratch" predictably either for fragments or materials or it has no use :unsure: ?

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

I think I've seen _scratch used to distort mirror reflections, e.g. the previous mirrorRenderMap stage filled _scratch which was then warped by a subsequent VFP stage. I could be mis-remembering though, and this may have been a suggestion which never worked in practice.

Link to comment
Share on other sites

You cannot count on the contents of _scratch to remain unchanged between material shaders as the order in which they are rendered is semi-random. But within a single material shader it's possible to render to _scratch using mirrorRenderMap or similar keywords in one stage and then reference the resulting contents of _scratch in a later stage.

Link to comment
Share on other sites

  • 4 weeks later...

Dumbest question in the world!!!!!!!!!!!!!!!!

 

"Can a light shader material have a reference to a fragment program?"

 


light/example

{

blendLight
noShadows

lightFalloffImage lights/squarelight1a

{

	blend 	add
map 	lights/squarelight1
zeroclamp 	// make sure it doesn't bleed over the edges
	colored 	// take rgba from entity shaderparms
}

{

	fragmentProgram example.vfp

	fragmentMap 0 _currentRender

	fragmentMap 1 path/to/texture

}

}

Edited by nbohr1more

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • OrbWeaver

      Finally got round to publishing a tutorial on baking normal maps in Blender, since most of the ones we have are inaccessible or years out of date.
      · 0 replies
    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 3 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
×
×
  • Create New...