Carmack's comments on NV30 vs R300, DOOM developments

Discussion in 'Architecture and Products' started by boobs, Jan 30, 2003.

  1. Reverend

    Banned

    Joined:
    Jan 31, 2002
    Messages:
    3,266
    Likes Received:
    24
    Coz he makes engines that sells that other developers use to make games?
     
  2. Humus

    Humus Crazy coder
    Veteran

    Joined:
    Feb 6, 2002
    Messages:
    3,217
    Likes Received:
    77
    Location:
    Stockholm, Sweden
    Compare these code snippets from my Shadows that don't suck demo:

    Code:
    GLuint shaderID = glGenFragmentShadersATI(1);
    glBindFragmentShaderATI(shaderID);
    glBeginFragmentShaderATI();
    	GLfloat offset[] = { 0.02f, 0.02f, 0.02f, 0.02f };
    	glSetFragmentShaderConstantATI(GL_CON_0_ATI, offset);
    
    	glSampleMapATI(GL_REG_0_ATI, GL_TEXTURE0_ARB, GL_SWIZZLE_STR_ATI);
    	glSampleMapATI(GL_REG_1_ATI, GL_TEXTURE1_ARB, GL_SWIZZLE_STQ_ATI);
    	glSampleMapATI(GL_REG_2_ATI, GL_TEXTURE2_ARB, GL_SWIZZLE_STR_ATI);
    	glSampleMapATI(GL_REG_3_ATI, GL_TEXTURE3_ARB, GL_SWIZZLE_STR_ATI);
    
    	glColorFragmentOp2ATI(GL_DOT3_ATI, GL_REG_0_ATI, GL_NONE, GL_SATURATE_BIT_ATI, GL_REG_0_ATI, GL_NONE, GL_2X_BIT_ATI | GL_BIAS_BIT_ATI, GL_REG_1_ATI, GL_NONE, GL_2X_BIT_ATI | GL_BIAS_BIT_ATI);
    	glColorFragmentOp2ATI(GL_SUB_ATI,  GL_REG_2_ATI, GL_NONE, GL_NONE, GL_REG_2_ATI, GL_NONE, GL_NONE, GL_REG_3_ATI, GL_NONE, GL_NONE);
    	glColorFragmentOp2ATI(GL_MUL_ATI,  GL_REG_0_ATI, GL_NONE, GL_NONE, GL_REG_0_ATI, GL_NONE, GL_NONE, GL_PRIMARY_COLOR_ARB, GL_NONE, GL_NONE);
    	glColorFragmentOp2ATI(GL_ADD_ATI,  GL_REG_2_ATI, GL_NONE, GL_NONE, GL_REG_2_ATI, GL_NONE, GL_NONE, GL_CON_0_ATI, GL_NONE, GL_NONE);
    	glColorFragmentOp3ATI(GL_CND0_ATI, GL_REG_0_ATI, GL_NONE, GL_NONE, GL_REG_0_ATI, GL_NONE, GL_NONE, GL_ZERO,      GL_NONE, GL_NONE, GL_REG_2_ATI, GL_NONE, GL_NONE);
    
    glEndFragmentShaderATI();
    
    
    ----------------------------------------------------
    
    
    GLuint shaderID = glGenLists(1);
    glNewList(shaderID, GL_COMPILE);
    	
    	glCombinerParameteriNV(GL_NUM_GENERAL_COMBINERS_NV, 4);
    
    	glCombinerInputNV(GL_COMBINER0_NV,  GL_RGB, GL_VARIABLE_A_NV, GL_TEXTURE0_ARB, GL_EXPAND_NORMAL_NV, GL_RGB);
    	glCombinerInputNV(GL_COMBINER0_NV,  GL_RGB, GL_VARIABLE_B_NV, GL_TEXTURE1_ARB, GL_EXPAND_NORMAL_NV, GL_RGB);
    	glCombinerOutputNV(GL_COMBINER0_NV, GL_RGB, GL_TEXTURE0_ARB, GL_DISCARD_NV, GL_DISCARD_NV, GL_NONE, GL_NONE, GL_TRUE, GL_FALSE, GL_FALSE);
    
    	glCombinerInputNV(GL_COMBINER1_NV,  GL_RGB, GL_VARIABLE_A_NV, GL_TEXTURE2_ARB, GL_SIGNED_IDENTITY_NV, GL_RGB);
    	glCombinerInputNV(GL_COMBINER1_NV,  GL_RGB, GL_VARIABLE_B_NV, GL_ZERO,         GL_UNSIGNED_INVERT_NV, GL_RGB);
    	glCombinerInputNV(GL_COMBINER1_NV,  GL_RGB, GL_VARIABLE_C_NV, GL_TEXTURE3_ARB, GL_SIGNED_NEGATE_NV,   GL_RGB);
    	glCombinerInputNV(GL_COMBINER1_NV,  GL_RGB, GL_VARIABLE_D_NV, GL_ZERO,         GL_UNSIGNED_INVERT_NV, GL_RGB);
    	glCombinerOutputNV(GL_COMBINER1_NV, GL_RGB, GL_DISCARD_NV, GL_DISCARD_NV, GL_TEXTURE2_ARB, GL_NONE, GL_NONE, GL_FALSE, GL_FALSE, GL_FALSE);
    
    	GLfloat offset[] = { 0.52f, 0.52f, 0.52f, 0.52f };
    	glCombinerParameterfvNV(GL_CONSTANT_COLOR0_NV, offset);
    	glCombinerInputNV(GL_COMBINER2_NV,  GL_ALPHA, GL_VARIABLE_A_NV, GL_TEXTURE2_ARB,       GL_SIGNED_IDENTITY_NV, GL_BLUE);
    	glCombinerInputNV(GL_COMBINER2_NV,  GL_ALPHA, GL_VARIABLE_B_NV, GL_ZERO,               GL_UNSIGNED_INVERT_NV, GL_BLUE);
    	glCombinerInputNV(GL_COMBINER2_NV,  GL_ALPHA, GL_VARIABLE_C_NV, GL_CONSTANT_COLOR0_NV, GL_SIGNED_IDENTITY_NV, GL_BLUE);
    	glCombinerInputNV(GL_COMBINER2_NV,  GL_ALPHA, GL_VARIABLE_D_NV, GL_ZERO,               GL_UNSIGNED_INVERT_NV, GL_BLUE);
    	glCombinerOutputNV(GL_COMBINER2_NV, GL_ALPHA, GL_DISCARD_NV, GL_DISCARD_NV, GL_SPARE0_NV, GL_NONE, GL_NONE, GL_FALSE, GL_FALSE, GL_FALSE);
    
    	glCombinerInputNV(GL_COMBINER3_NV,  GL_RGB, GL_VARIABLE_A_NV, GL_ZERO,             GL_SIGNED_IDENTITY_NV, GL_RGB);
    	glCombinerInputNV(GL_COMBINER3_NV,  GL_RGB, GL_VARIABLE_B_NV, GL_ZERO,             GL_SIGNED_IDENTITY_NV, GL_RGB);
    	glCombinerInputNV(GL_COMBINER3_NV,  GL_RGB, GL_VARIABLE_C_NV, GL_TEXTURE0_ARB,     GL_UNSIGNED_IDENTITY_NV, GL_RGB);
    	glCombinerInputNV(GL_COMBINER3_NV,  GL_RGB, GL_VARIABLE_D_NV, GL_PRIMARY_COLOR_NV, GL_UNSIGNED_IDENTITY_NV, GL_RGB);
    	glCombinerOutputNV(GL_COMBINER3_NV, GL_RGB, GL_DISCARD_NV, GL_DISCARD_NV, GL_SPARE0_NV,   GL_NONE, GL_NONE, GL_FALSE, GL_FALSE, GL_TRUE);
    
    	glFinalCombinerInputNV(GL_VARIABLE_A_NV, GL_ZERO,      GL_UNSIGNED_IDENTITY_NV, GL_RGB);
    	glFinalCombinerInputNV(GL_VARIABLE_B_NV, GL_ZERO,      GL_UNSIGNED_IDENTITY_NV, GL_RGB);
    	glFinalCombinerInputNV(GL_VARIABLE_C_NV, GL_ZERO,      GL_UNSIGNED_IDENTITY_NV, GL_RGB);
    	glFinalCombinerInputNV(GL_VARIABLE_D_NV, GL_SPARE0_NV, GL_UNSIGNED_IDENTITY_NV, GL_RGB);
    
    glEndList();
    
    These two both do the same thing, now tell me which one looks more confusing.
     
  3. PSarge

    Newcomer

    Joined:
    May 7, 2002
    Messages:
    147
    Likes Received:
    0
    Location:
    UK
    Both :!:
     
  4. T2k

    T2k
    Veteran

    Joined:
    Jun 12, 2002
    Messages:
    2,004
    Likes Received:
    0
    Location:
    The Slope & TriBeCa (NYC)
    Quite impressive... :wink:
     
  5. antlers

    Regular

    Joined:
    Aug 14, 2002
    Messages:
    457
    Likes Received:
    0
    Humus just gave an excellent example of why some people prefer DirectX.
     
  6. Xmas

    Xmas Porous
    Veteran Subscriber

    Joined:
    Feb 6, 2002
    Messages:
    3,344
    Likes Received:
    176
    Location:
    On the path to wisdom
    I guess that's why NVidia created the NVParse tool.
     
  7. KimB

    Legend

    Joined:
    May 28, 2002
    Messages:
    12,928
    Likes Received:
    230
    Location:
    Seattle, WA
    Um, but those are using the register combiners? I thought I was talking about the pixel shader/vertex program extensions?
     
  8. Humus

    Humus Crazy coder
    Veteran

    Joined:
    Feb 6, 2002
    Messages:
    3,217
    Likes Received:
    77
    Location:
    Stockholm, Sweden
    Well, I could compare vs2.0/ps2.0 vs. GL_ARB_vertex_program/GL_ARB_fragment_program where OpenGL is way simplier to deal with.
     
  9. Humus

    Humus Crazy coder
    Veteran

    Joined:
    Feb 6, 2002
    Messages:
    3,217
    Likes Received:
    77
    Location:
    Stockholm, Sweden
    Well, if that's confusing then I suppose you haven't worked with pixel shaders in OpenGL.

    GL_NV_register_combiners == nVidias pixel shaders in OpenGL.

    Or do you know any other pixel shading extensions that runs on GF3? It's GL_NV_register_combiners + GL_NV_texture_shader that defines nVidia's pixel shader. The ALU stuff is in the combiners and dependent texture reads and similar is in the texture_shader. And that's it. So yes, nVidia's pixels shading extensions for sub-GFFX cards are much more confusing.
     
  10. Sherlock

    Newcomer

    Joined:
    Jul 29, 2002
    Messages:
    25
    Likes Received:
    0
    Location:
    Colorado, USA
    He'd want to develop and see his game running as best as possible, so he'd for sure use what's been the best card commercially available for the last 6 mo. and also code with it in mind (though not exclusively).
     
  11. depth_test

    Newcomer

    Joined:
    Feb 1, 2003
    Messages:
    14
    Likes Received:
    0
    Both of those extensions suck, because building up a program or expression procedurally sucks. A syntactic interface is much better, concise, and easier to read.
     
  12. Evildeus

    Veteran

    Joined:
    May 24, 2002
    Messages:
    2,657
    Likes Received:
    2
    We have at least some information on the performance of each card using the leaked demo :!:
    [​IMG]
     
  13. Ichneumon

    Regular

    Joined:
    Feb 3, 2002
    Messages:
    414
    Likes Received:
    1
    Will be interesting to see if the ARB2 path improvements JC has mentioned lately affects those scores...

    Its one of the reasons using alpha builds of games for published performance benches seems arse-backwards to me. They won't reflect performance on the release game...
     
Loading...

Share This Page

  • About Us

    Beyond3D has been around for over a decade and prides itself on being the best place on the web for in-depth, technically-driven discussion and analysis of 3D graphics hardware. If you love pixels and transistors, you've come to the right place!

    Beyond3D is proudly published by GPU Tools Ltd.
Loading...