Talk:Adding Motion Blur

From Valve Developer Community
Revision as of 11:28, 21 November 2005 by Garry Newman (talk | contribs) (Precache?)

Jump to: navigation, search

view_scene.cpp \cl_dll\view_scene.cpp(1934) : error C2664: 'IMaterialVar::SetTextureValue' : cannot convert parameter 1 from 'IMaterial *' to 'ITexture *'

       Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

\cl_dll\view_scene.cpp(1939) : error C2065: 'pMatMBlur' : undeclared identifier :(


With the fixes that were added, it should be working now. Make sure to get the latest code from here and try again. --Snakez

What am I doing wrong here?

I've followed the tutorial to the letter, but my poor C++ skills are letting me down, it seems :-(

Build errors: src\cl_dll\view_scene.cpp(71): error C2039: 'DoMotionBlur' : is not a member of 'CViewRender'

src\cl_dll\view_scene.cpp(73): error C2065: 'pp_motionblur' : undeclared identifier

src\cl_dll\view_scene.cpp(73): error C2228: left of '.GetInt' must have class/struct/union type type is unknown-type

.. and so and so forth.

Anyone know what i've done wrong? --JamesHarrison 05:59, 23 Aug 2005 (PDT)

I updated the tutorial.. add

 #include "materialsystem/materialsystemutil.h"

--Garry Newman 11:55, 6 Nov 2005 (PST)

Bug? Or Just some sort of glitch?

Every thing works good, great tutorial! However there is some kinda weird thing going on. all the breakable crates and just the breakable crates are doing a HOM effect instead of having their textures drawn. Has anyone else come across this? I did the tutorial exactly as it was presented so I'm not sure why it's doing this.

Precache?

How would one go about doing a precace on this texture, seeing that it is not a real metrial?

I have done a PrecacheMaterial( "HUDoverlays/frontbuffer" ); but MB is still laging on the first load...

  • Possibly because of this?: pMatScreen = materials->FindMaterial( "frontbuffer", TEXTURE_GROUP_OTHER, true );ts2do (Talk | @) 20:52, 11 Nov 2005 (PST)
    • that wont matter becuase my code has been changed to reflect the movement of the frontbuffer material

It isn't hitching when loading the material, it's hitching when creating the texture for some reason. Call the GetMoBlurTex0() function before it starts the game to create the texture there instead of in-game. --Garry Newman 03:28, 21 Nov 2005 (PST)