Jump to content

IgorBgz90

Members
  • Posts

    53
  • Joined

  • Last visited

Everything posted by IgorBgz90

  1. For flowgraph Timer.zip
  2. Indeed, thank you Rick. Update!
  3. If anyone needs, I'll leave it here Timer: if Timer~=nil then return end Timer={} function Timer:Create(name, interval,enable) local timer={} timer.name = name timer.interval = interval timer.enable = enable timer.time = Time:GetCurrent()+timer.interval local k,v for k,v in pairs(Timer) do timer[k] = v end return timer end function Timer:Update() if self.enable then if Time:GetCurrent() > self.time then self.time = Time:GetCurrent()+self.interval return true else return false end end end How to use: function App:Start() --Timer self.time_hours = 0 self.time_minutes = 0 self.time_seconds= 0 self.timer = Timer:Create("timer",1000,true) end function App:Loop() --Very complex calculation time if self.timer:Update() then self.time_seconds= self.time_seconds+1 if self.time_seconds== 60 then self.time_minutes = self.time_minutes+1 if self.time_minutes == 60 then self.time_hours = self.time_hours+1 self.time_minutes = 0 end self.time_seconds= 0 end end --Draw current time self.context:SetColor(1,1,1,1) --Seconds local seconds if self.time_seconds < 10 then seconds = "0"..self.time_seconds else seconds = self.time_seconds end --Minutes local minutes if self.time_minutes < 10 then minutes = "0"..self.time_minutes else minutes = self.time_minutes end --Hours local hours if self.time_hours < 10 then hours = "0"..self.time_hours else hours = self.time_hours end local time_string = hours..":"..minutes..":"..seconds self.context:DrawText("Timer: "..time_string,2,2) end
  4. Yes. The originally 30 fps. With one monitor 15 fps
  5. There is a way to get the texture of the buffer, without a strong drawdown FPS? Simple code of Monitor: function Script:Start() --Material self.material = Material:Load("Materials/Monitor/monitor.mat") self.entity:SetMaterial(self.material) --Buffer self.buffer = Buffer:Create(App.window:GetWidth(),App.window:GetHeight(),1,0); self.buffer:SetColorTexture(Texture:Create(App.context:GetWidth(),App.context:GetHeight())) self.buffer:Disable(); end function Script:UpdateWorld() self.buffer:Clear() self.buffer:Enable() self.entity:Hide() --self.camera:Show() App.world:Render() --self.camera:Hide() self.buffer:Disable() self.material:SetTexture(self.buffer:GetColorTexture(),0) Context:SetCurrent(App.context) self.entity:Show() end One monitor, point light and room 4x4 As a result, the FPS - 5 If two monitor FPS - 10 etc Implementation in irrlicht engine: ITexture* RTTTex = driver->createRenderTargetTexture(dimension2d<s32>(512,512)); Result over 75 fps (For me) Demo, Source code and shaders: irrlicht.zip
  6. IgorBgz90

    SSAO fixes

    Thank you guys. Updated.
  7. Thanks. No, texture took from the Internet. Pieces did imposition on the UW texture. (Google Translate ) (Спасибо. Нет, текстуру дерева брал из интернета. Затем частично, выборочно вырезал части и накладывал на текстуру UW. Затем, рисовал края.) http://pichost.me/1532439/
  8. Learn the basics of modeling! Modelling ~ 15 min. Texturing more than 6 hours .
  9. Good! Update: float offsetScaleStep = 1.0 + 2.5 / samples; decreased from 2.5 to 1.5
  10. I'll try to fix it. On 2 Pic. After starting the problem will disappear. Problem due to the resize of the window.
  11. Looks cool! Nice to see that the shader works not only for me . Update: Thank you YouGroove, good luck with project.
  12. Try starting with a simple. Visit the website: http://www.geeks3d.com/shader-library/ I recommend to take a shader of pixelation. Along the way, look into the source codes shaders, which are included in Leadwerks. Try, experiment in practice. The editor allows you to make mistakes. (And to be precise fix them without crashing). Update: GLSL documentation: https://www.opengl.org/sdk/docs/man4/html/ Good Luck!
  13. Sound is very important, and not only for the sound can be used. Correct decals, particles...
  14. Yes Rick I liked this implementation still in GoldSrc... Checking collision bullets, we can get the type of material object. And then draw the correct decals and particles.
  15. Please add in the next update - opportunity to get a type from the file material. I think it will be very comfortable and functional. You can make a return type int... int Material::GetType(); //Returns the type of material "Metal, Concrete, Wood, Water, Flesh, Grass etc.." Example of use: --FPSPlayer Footsteps Get type function Script:Collision(entity,position,normal,speed) if speed>20 then self:Hurt(100) end if entity:GetMaterial():GetType() ~! nil then if entity:GetMaterial():GetType() == Material:Type:Concrete then self.sound.footsteps.type = 1 end if entity:GetMaterial():GetType() == Material:Type:Metal then self.sound.footsteps.type = 2 end --etc end end Useful for the sound of footsteps, traces of bullets, particles etc.
  16. Looks very cool and atmospheric. Love horrors.
  17. It's good! Decal system works a little differently, uses the diffuse texture with alpha channel. Overlay uses light map for the creation of the volume. It looks very realistic .
  18. Hi! Trying to do texture mapping on the texture failed. In a fragment shader, for rendering I use only Normal Map with alpha channel and Specular map. Everything works fine, if the model is on the zero coordinate Z +- 3.0 Help! Shader: shader.zip Texture 1: Normal map with Alpha Texture 2: Specular map Screenshot's: Z: 0.0 Z: -4.0 +4.0 Maybe there is an alternative to achieve this effect? I hope you understand me
  19. Hello! How to started with Visual Express 2010 and Leadwerks 3.3? Received more than 950+ errors.
×
×
  • Create New...