# Muncher

Member

306

101 Neutral

• Rank
Member
1. ## what are derivative instructions

I was reading John Carmacks old blogs: http://www.armadilloaerospace.com/n.x/johnc/Recent%20Updates when i got to the section about derivative instructions in pixel shaders. Firstly, whats a derivative.. and second, whats a derivative? Thanks for any help...

ok that makes sense, thanks (rating++) Just off topic (and i apologise) On new hardware (gf6/7 etc) - the number of textures we can sample in a pixel shader is limited the the number of texture units right? So my geforce 7800 can access 4 textures per program (num texture units is 4)... But while looking up dependant texture reads, i came across an article that stated "its possible to access up to 8 different textures (in a fragment program), but only a limited number of dependant texture fetches can be performed..." Does this mean that we can access more textures in a shader if they are not read dependently?

What is a dependant texture read (in a pixel shader) ? I can't find a definition anywhere :) Cheers Paul
4. ## packing a float into a vector

well, the output in the shader is clamped to 1.0 (i think) - am i right in thinking that x stores the fractional part y stores the first byte z the second byte so shouldnt floor(dist)/256.0f actually be /255.0f if it's to be in the 0-1 range? and the 65516.0f should be 65535.0f - or have i missed something?
5. ## packing a float into a vector

Can someone please help me understand the following Cg fragment shader code: I think what this shader is packing a floating point number into a 3 compoment vector; what i'm not sure about is how its doing this. float4 main(fpin IN) : COLOR0 { // Distance to the light squared float dist = dot(IN.LightVec, IN.LightVec); float temp = floor(dist)/256.0f; float temp2 = floor(dist-256)/65516.0f; return float4(frac(dist),temp, temp2,1.0); }

7. ## DLL question

I have created a dll, and would like multiple processes to load it; is there a way to count how many processes/applications have loaded a particular DLL (internally to the DLL) ? Or does each process need to load a unique copy of the DLL? Cheers :)
8. ## spash screens

I love those beautiful splash / loading screens that pop up when the application is launched! An example would be the Nero / Photoshop, even the visual studio splash screen. How do you do them (C++)? Or rather, what is the technique that most commercial packages use? Is it just a frameless/borderless (WM_POPUP) window thats created with a CreateWindow() call? If so, how does the photoshop window appear to have its image appear to extend beyond the window bounds? It looks as if there is some transparent / alpha stuff going on there. Ideally there would be a Win32 API call: ShowSplashScreen(char *bitmapFilename), but we can only dream :)

12. ## building makefiles in windows

ahh cheers mate! looks like MinGW is the way to go :)
13. ## building makefiles in windows

Hi, I'm coming across alot of projects that are distributed with a makefile, but no vcproj file. Im only used to working in windows, but how can i build these projects? Is there some way to convert a makefile to a vcproj file?
14. ## is open source viable for a company

My understading of OC software is rather limited; but if you sold OC software, are you also selling the content? Is that what you mean by customization services? If i sold software that compliled to a single executable, then going open source would be a bad idea. But if that executable required additional content to run your program (ie/ model files, bitmaps, sound files) then these remain your property.. so it's not all that bad?
15. ## is open source viable for a company

Hello, this could be a really silly thought, so beware :) But is making all of your source for a commercial project (game, or related field) completely open source with a GNU license good idea. I can see lots of benefits, especially in being able to use other open source code within your project, saving time for developing in house. You can still sell your product, as all of the content is copyrighted and needs to be purchased; i guess one of the problems is if alot of your IP is the code itself... Are any commercial companies taking this approach? It would be great if everyone did it :) Muncher