Jump to content
The Dark Mod Forums

revelator

Development Role
  • Posts

    1163
  • Joined

  • Last visited

  • Days Won

    21

Everything posted by revelator

  1. Exactly and thats why if we want this to be fully able to control all light via custom shaders that i ment it would have to be early on in the shader process, it will be one hell of a coding nightmare but it should be doable. And as you pointed out the engine can allready use custom shaders and theres nothing keeping them from defining a lightsource but there will be drawbacks. Im pretty much 100% that if we want this in we wont be able to do it with a few lines of code i suspect something in the line of several hundreds of lines of code hehe.
  2. Yep used the test material supplied by nbohr1more, still crashes if i remove the interaction code in draw_arb2.cpp it works again though. so i suspect we need some code to check if the material is active or else fallback to the normal, strangely enough the IsCustomLight check allways returns true even if theres no material
  3. Hmm that was my first try unfortunatly while it compiles it crashes the engine on map load.
  4. Darn i had a hunch that might be the case as far as i can see only ARB is passed to draw_arb2.cpp so that seems correct, as for the custom light shader i would think we have to pull out the big guns to get that one working, all my attempts have failed miserably . Looking at material.cpp we have foglights blendlights and ambientlights normally, while foglights and blendlights dont interact ambientlights seem to do so hmm.
  5. Hmm question what kind of lights are you intending to customize with this ? i had a look at the blendlight code and it might be possible to make a clone specifically for this. Its also a rather misleading function as its called by fogalllights but has other uses than just fog. Its a bit of a weird one though as it blends 2 surface lights together so the other one would need to be from the custom light shader.
  6. Urgh this will not be an easy fix, im running through methods of doing this but the only place that will likely work is by doing this early on in the interaction code. Lights are done by precalculated constant registers which are a hard read as they are not exactly descriptive, but i think this one is for light -> OP_TYPE_LT. Problem here is that to yank in custom light definitions it would need a rather hefty rewrite. We would need to replace those precalculated values by the ones parsed from the custom light shader instead. This would also mean that any small error in the shader would crash the engine unless we can dig out a way to fall back to the precalculated ones in case it fails. We also need to get the types for view origin / projection and falloff correctly. My head is spinning from reading this
  7. Hmm so you want this to accept a non prebound shader, oki not quite sure how vanilla handles that but ill see what i can find out about it. Will probably require a lot more code than this i suspect. Ok looked around and seems this is what allows non predefined shaders to be parsed from materials. for (int i = 0; i < newStage->numVertexParms; i++) { const float parm[4] = { regs[newStage->vertexParms[i][0]], regs[newStage->vertexParms[i][1]], regs[newStage->vertexParms[i][2]], regs[newStage->vertexParms[i][3]] }; glProgramLocalParameter4fvARB(GL_VERTEX_PROGRAM_ARB, i, parm); } for (int i = 0; i < newStage->numFragmentProgramImages; i++) { if (newStage->fragmentProgramImages[i]) { GL_SelectTexture(i); newStage->fragmentProgramImages[i]->Bind(); } } glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, newStage->fragmentProgram); glEnable(GL_FRAGMENT_PROGRAM_ARB); which btw is in the same function where you turned off processing things such as customLight.def So if i understand this right the fix is simply removing // prevent stage processing of ARB programs in customLight def if (backEnd.vLight->lightShader->IsCustomLight()) { return; } and remove the code in draw_arb2.cpp ? looking further this same process is used in material.cpp to parse definitions out of unbound shaders.
  8. Ok i think i have something down that might do what you want without the game code changes. Created a new function for using cubemapped light from textures, a bit like the ambient code. new shader will use _custom def from light and the shader uses a customLight token.
  9. Hmm no there a bit more than cvar toggling to it as far as i can see it uses JC Dentons code for custom ambient lights, and theres a lot of code for it mostly by grayman. From what i can glean it seems to use a table to make sure the ambient light values are keept in check so as to not allow silly values. Look for grayman #3584 in the code to see all the places where ambient light is parsed.
  10. Hmm changes break the engine, not sure if its because im missing the shader but unless it finds the token "customLight" it should actually just skip over it but seems it does not. Makes testing a bit hard tbh :S if you spot the bug feel free to make changes as you see fit. Ill commit in a bit.
  11. Aye i hate messy code besides we need a lot more code for this to work after having a look at rebb's chain for ambient light it seems we also need game code changes and ive done a few of the changes now but the rest of the interface someone else will have to finish as im really bad with game code hehe.
  12. Ok i think i got it in working order now, while fixing this up i also moved the vertex and fragment programs for megatexture support out of material.cpp and into draw_arb2.cpp in the chain that looks for custom shaders. ill commit it in a bit.
  13. I can only guess that ms recently did some massive changes to msvc 2013 so be carefull when updating it, as they have stated that the old multibyte support libraries will be removed completely. well i got it to compile but it crashes when loading any mission, btw do i need a new shader for the changes you made ? also i had to make some workarounds in draw_arb2.cpp as newstage is not defined anywhere the compiler refused to compile it. i fixed that by looking at the code in draw_common.cpp to see how newstage was defined, which btw left some questions as it seems to disable certain parts, like ambient lighting. msvc2013 also needs recompiled versions of boost to be able to build darkmod, but if what you say is true i suspect greebo simply uses the 2010 toolset from the msvc 2013 interface.
  14. Checked out your changes and i can report that it needs a few fixes before compiling. Also msvc 2013 is a complete nogo vanilla will newer work with it unless we change all the underlying functions to unicode (that will be a massive undertaking), the reason is that ms has removed multibyte support completely so all projects need to be unicode. I found something that might work though here http://www.microsoft.com/en-us/download/details.aspx?id=40770 this will install the removed multibyte support so that part should work again. There are also problems with vanilla being unable to find system headers such as windows.h and winsock2.h because the SDK paths are all wrong for msvc 2013. Im working on it though and i hope to have the changes in soon.
  15. P.s im busted (black friday here in denmark) so ill take a nap before ill start investigating this.
  16. MH moved most of the shader commands to the framebuffer if i remember correctly, and it was indeed interesting as he gained much more detail than normal in doom3 by doing it. I think there was also a few engine changes needed for it to work. Newer quite understood swizzle but ill see if i can find some documentation about it.
  17. Cool m8 steve is also joining in on this branch to help btw.
  18. Actually starting on my new part time job tomorrow so a bit less time to work on this, no worries though ill still work on this.
  19. Ok removed glasswarp. Added a function to clear matrix interactions that might interfere with the gui, one such is the POM shader from sikkmod, sliding may still happen but thats another problem caused by bad normals. Used idlibs clampFloat to clamp color variations. edit: this part - else if ( !token.Icmp( "glassWarp" ) ) { - ts->texgen = TG_GLASSWARP; - continue; - } was changed to else if ( !token.Icmp( "glassWarp" ) ) { - ts->texgen = TG_GLASSWARP; continue; } that way we wont get an error in the unlikely case someone do actually use it.
  20. Whoops just noticed these are only defined for tdm_update so added /lib32 /usr/lib32 to sconstruct for darkmod, comitted changes.
  21. Hmm scons actually does look in /usr/lib32 look here from sconscript. if ( g_os == 'Linux' or g_os == 'MacOSX' or g_os == 'FreeBSD' ): if g_os == 'Linux': if LINUX_TARGET_ARCH == 'i386': # get the 64 bit machines on the distcc array to produce 32 bit binaries BASECPPFLAGS.append( '-m32' ) BASELINKFLAGS.append( '-m32' ) # help 64 bit machines to find the compatibility 32bit libraries BASELINKFLAGS.append( '-L/lib32' ) BASELINKFLAGS.append( '-L/usr/lib32' ) BASELINKFLAGS.append( '-pthread' ) BASELINKFLAGS.append( '-lrt' ) # Add the __linux__ define BASECPPFLAGS.append('-D__linux__') something seems to be fubar
  22. Allready works for windows just having a few problems with paths on the linux distros, glew is also located in /usr/lib32 on my 64 bit kubuntu and it does get picked up on my 64 bit kubuntu so not sure whats going wrong on your version :S the only problem i ran into was that the system supplied zlib version of my kubuntu 64 was incompatible with the devil version in darkmod so i had to move it out of the way when building so that it picks up the version from darkmod instead. im going to look into scons looking in the wrong place, hang on.
  23. Got a little box for ya.

    1. Show previous comments  1 more
    2. Xarg

      Xarg

      What's in the box!

    3. Sotha

      Sotha

      Papa's got a brand new bag... ehm.. box!

       

      I hope it ain't booby trapped...

    4. Goldwell

      Goldwell

      Uncle Fred is that you?!

  24. might be missing the x86 version or if you got it something might have acted up in the package installer ? try sudo apt-get -f install without any packages to let apt-get try to autocorrect problems.
×
×
  • Create New...