Agreed.
For a fullscreen application, the device is only seldom lost. You don't want to reserve e.g. 512MB of system memory for textures all the time if the application can reload them easily from...
Type: Posts; User: LarsMiddendorf
Agreed.
For a fullscreen application, the device is only seldom lost. You don't want to reserve e.g. 512MB of system memory for textures all the time if the application can reload them easily from...
Yes and this would be also very useful for shader objects.
Is this really necessary? It would be acceptable if the driver cannot perform a whole program optimization between the shader objects.
Would it be difficult to support intra-stage linking in a similar way?
If you write the above NV_fragment_program2 example in glsl, the current compiler inserts always an unnecessary dynamic branch BRK into the loop. Loops with only REP and without the dynamic BRK are...
What is the current status? Are there any plans to implement this?
Is the dynamic array compile time feature fast enough to be used at runtime and to avoid creating multiple shaders or is it just a more elegant version of using macros ?
What about the new CgFx 1.4 Format ? How does it compare to collada ?
I don't know if it depends on the output format, but I checked the assemly output and there was a NRM instruction for the normalize() function.
The compiler used the BRK command for dynamic...
NRM works only with the fp16 format. You've to use the half3 type.
I had a similar problem and it seems that the current compiler always uses dynamic branching for the loop which is very expensive. A REP instruction in an ARB_fp shader, which the compiler should...
You can store all the light parameters in a texture.
I've never written that OOP is the only correct way, although it is probably not the worst. I mentioned that uniform pointers would be nice in the c-style glsl language.
Of course you can do it all...
Shaders must become modular and reusable.
It could be optimized by the driver because it can reuse parts of the shader. I'm not sure, but doesn't the GF embed all uniform variables as constants...
They should have included (function) pointers for uniform variables. Changing such a variable obviously requires recompilation, but it would be very flexible.
I looked at the DX SDK and it is even written in the help that it's very light weight to link shader fragments. But the glLinkProgram function in OpenGL is very slow with NVidia drivers. That makes...
Yes you can link shader objects and functions are connected by name and parameters, but with interfaces you can select the linked set of functions individually for each instance of an interface type.
I agree that interfaces are very powerful. They provide a nice way to separate material and light shaders. I hope that they will be also supported in glsl.
Is it or will it be possible to use Cg to...
There is a pdf describing pseudo instancing in the nvidia sdk. They use glMultiTexCoord to pass the Modelview Matrix which is faster than glUniform or changing the Matrix.
...
You could possible get correct silhouettes by transforming the three edges of the triangle into texture space and killing those pixels that lay outside of the triangle. That would be three DP3...
http://www.gamedev.net/community/forums/topic.asp?topic_id=266373
This is an interesting idea. But how to get the correct offset if you only know how far the current pixel should be moved?...
Carmack talks about screen space displacement mapping at the last QuakeCon.
You could project the offset vector from (steep) parallax or relief mapping into screen space. Then you've got the vector...
The parameter lightcount is assigned to i0.
I compiled only the pixel shader without an .fx file. The shader itself is senseless, but the interesting thing is the loop. Here is the output:
//...
That could have been the special pattern, but it generated nearly the same code. Only the SLTRC is replaced with SGERC. All fragments are running through the same path of the shader.
I've also...
I did some tests and it seems that LOOP and REP are nearly equally fast,when the index register is not used. It's surprising how many instructions can be executed without to much performance lost, if...
Thank's for your reply. I hoped there was a special pattern for this kind of loop. There is a not unimportant speed difference between "#define lightcount" and "uniform lightcount" with full dynamic...