-
Posts
662 -
Joined
-
Last visited
-
Days Won
15
Everything posted by Einheit-101
-
The problem is that it looks crappy and the reflection is lagging by 1 frame.
-
This is part of my shader that is responsible for the reflection. I update the reflectionTexture as screenSource each "onHUDRender" because otherwise you have the User interface in the reflection image. ... sampler2D envMapSampler = sampler_state { Texture = <reflectionTexture>; AddressU = Mirror; AddressV = Mirror; MinFilter = Linear; MagFilter = Linear; MipFilter = Linear; }; ... // Vertex Shader //////////////////////////////////////////////////////////////////////////////// PixelInputType WaterVertexShader(VertexInputType input) { PixelInputType output; matrix projection; // Create the view projection world matrix for reflection. projection = mul(gWorldViewProjection, gWorld); projection = mul(gWorld, projection); // Calculate the position of the vertex against the world, view, and projection matrices. output.position = MTACalcScreenPosition(input.position); output.worldPosition = MTACalcWorldPosition(input.position); output.lightDirection = normalize(gCameraPosition - sunPos); output.worldNormal = MTACalcWorldNormal(input.normal); // Store the texture coordinates for the pixel shader. output.textureCoords = input.textureCoords; // Calculate the input position against the projection matrix. output.refractionPosition = mul(input.position, projection); // compute the eye vector float4 vertexPosition = mul(input.position, gWorld); float4 eyeVector = vertexPosition - gViewInverse[3]; output.skyTextureCoordinate = mul(eulRotate(skyRotate), eyeVector.xyz); float4 vPos = mul(vertexPosition, gView); float4 pPos = mul(vPos, gProjection); // I think here is a mistake, this should calculate the reflection positions output.reflectionPosition.x = 0.5 * (pPos.w + pPos.x); output.reflectionPosition.y = 0.5 * (pPos.w - pPos.y); output.reflectionPosition.z = pPos.w; output.Depth = output.position.z; output.vposition = mul(input.position, gWorldViewProjection); return output; } ... // Pixel Shader //////////////////////////////////////////////////////////////////////////////// float4 WaterPixelShader(PixelInputType input) : COLOR0 { // useless stuff going on.... // only reflection stuff now reflectTexCoord = float2(input.reflectionPosition.xy / input.reflectionPosition.z); //flip the image to get a reflection (maybe here is the error? But how to flip otherwise?) reflectTexCoord.y = 1 - reflectTexCoord.y; reflectionColor = tex2D(envMapSampler, reflectTexCoord) * reflectionStrength; .......
-
I will post the code soon when i have time, currently i am using resampleNow but it doesnt work. What is a render target scene reader?
-
Hi all, i am currently working on new water reflections (Because there is no good water shader with water reflections) and i am facing numerous problems. One of the major problems is the fact that the reflection is always lagging 1 frame behind the actual image. Is it possible to fix that?
-
Its a bad idea to draw shaders with dx functions because they mess up the rendering order, you would encounter issues with effects nd other stuff rendering in front of your effect, its better to apply a shader to the world texture and modify its values through MTA - if possible.
-
SAAW: San Andreas At War - World War II | v1.2 | 24/7 |
Einheit-101 replied to Einheit-101's topic in Servers to play on
Which draw distance issues are you talking about? Do you think its better to enable mid-map voting only if there are only 2-3 players online? This would remove map voting in larger battles. Because it often happens that 2 players join the empty server and then they are stuck on a giant map for 20 minutes. -
You wont get help for this, shaders are complicated and their documentation is terrible, and debugging them is literally impossible either. Since Ren712 and Sam@ke (MTA shader experts) have left MTA, there is no one left who knows anything about HLSL that goes beyond 5% of shader knowledge.
-
SAAW: San Andreas At War - World War II | v1.2 | 24/7 |
Einheit-101 replied to Einheit-101's topic in Servers to play on
UPDATE -Update to MTA 1.5.7 -Fixed a reload animation skip glitch when pressing C+R quickly -Updated dynamic lighting to use new "areVehicleLightsOn" function when the client meets the requirements -Removed the need of pressing "W" to enable debugging for staff members, added new setPlayerScriptDebugLevel instead -Updated Berlin-Mitte to latest version -Fixed an annoying warning of admin panel -Fixed fire rate of Remington Mod. 11 and Sjögren Inertia shotguns Future technical improvements I am never stopping to learn and in the meantime i managed to improve some shader effects, namely dynamic lighting and the water shader. While the new dynamic lighting will most likely not be implemented in SAAW-WW2 (it is very demanding for weak PCs), the improved water shader will most likely hit SAAW-WW2 with a coming update. The changes in detail: Dynamic lighting has been enhanced by a "night-mode" that can actually make nights realistically dark. This effect is demanding and will not be implemented in WW2 but it is a core feature of my next server. Dynamic lighting can also support lightmapping (Textures on objects/vehicles/players that can self-illuminate in the darkness). The follwing picture shows a dark environment at 2:00 AM with a robot that has glowing eyes. Better implementation of dynamic lighting with normal shading - the current lighting method has some issues because it is not compatible with the sun shader. Sun shader will not be used in my next server project, thats why i can make dynamic lighting fully compatible with everything: OLD STANDARD GTA AT NIGHT CURRENT DYNAMIC LIGHTING + NEW NIGHT MODE NEW DYNAMIC LIGHTING + NEW NIGHT MODE COMPATIBLE And now lets get to the most interesting aspect (at least for me, lol, it was a bunch of work) Shore fading! Objects in water do now fade out when they sink deeper into the water, the water is no longer a "hard" surface where suddenly everything disappears. The effect is not 100% finished yet but i think it could be done really quick. OLD WATER SHADER: NEW WATER SHADER: -
This tutorial is amazing, thanks for sharing your knowledge, especially with the Alpha ID trick / 2nd UV layers.
-
So the central message of you is that a table is being looked up faster when the key is shorter, which makes sense.
-
The problem is that the documentation of these vertex prelights is "poor" to say the least, i tried to bring that into some of my own models but i had no success. Personally i would be glad for some help about this...
-
So you say its always a bad idea to access a table with an element as index? table[vehicle] is worse than table[number] ? Is there any reasonable explanation why that is the case or is it just a funfact?
-
Very good, i didnt expect this so soon.
-
I would suggest a "setting" that automatically stores all Lua functions inside the computers RAM for people who can afford that, it would increase performance of large scripts tremendously.
- 21 replies
-
- onclienthudrender
- onclientprerender
-
(and 1 more)
Tagged with:
-
I find it ridiculous that this isnt a basic thing of Lua itself, it should not eat less performance when functions are stored as local variables...
- 21 replies
-
- onclienthudrender
- onclientprerender
-
(and 1 more)
Tagged with:
-
SAAW: San Andreas At War - World War II | v1.2 | 24/7 |
Einheit-101 replied to Einheit-101's topic in Servers to play on
The server is back running. -
SAAW: San Andreas At War - World War II | v1.2 | 24/7 |
Einheit-101 replied to Einheit-101's topic in Servers to play on
We will set up everything this weekend. I hope MTA team will fix some important bugs soon. I want to create some new nice stuff. -
SAAW: San Andreas At War - World War II | v1.2 | 24/7 |
Einheit-101 replied to Einheit-101's topic in Servers to play on
San Andreas At War WW2 will be offline for a few days/weeks starting at 23.07.2019. I will change my server provider. -
SAAW: San Andreas At War - World War II | v1.2 | 24/7 |
Einheit-101 replied to Einheit-101's topic in Servers to play on
You have to use the map editor server. I can give you the password as PM -
SAAW: San Andreas At War - World War II | v1.2 | 24/7 |
Einheit-101 replied to Einheit-101's topic in Servers to play on
You can do whatever you want, as long as its a good map. -
SAAW: San Andreas At War - World War II | v1.2 | 24/7 |
Einheit-101 replied to Einheit-101's topic in Servers to play on
That is a MTA bug, i think its best to delete prone ability entirely The first one is possible and i will consider doing that, the second one is too much to do, active feature development for WW2 is stopped in favor of the next project. -
SAAW: San Andreas At War - World War II | v1.2 | 24/7 |
Einheit-101 replied to Einheit-101's topic in Servers to play on
It would not work, the weapons are not designed for that I dont know, create a bug report @ https://github.com/multitheftauto/mtasa-blue/issue And add your crash dumps. -
SAAW: San Andreas At War - World War II | v1.2 | 24/7 |
Einheit-101 replied to Einheit-101's topic in Servers to play on
Not a bad idea, maybe i do it. -
SAAW: San Andreas At War - World War II | v1.2 | 24/7 |
Einheit-101 replied to Einheit-101's topic in Servers to play on
350MB? Did you delete your MTA? The recent update was maybe 10mb... -
SAAW: San Andreas At War - World War II | v1.2 | 24/7 |
Einheit-101 replied to Einheit-101's topic in Servers to play on
Thats it. Every bug is fixed (at least the ones that could be reproduced reliably). And the missing skins are here. UPDATE: -Added missing british sniper, gunner, medic and engineer skins -New model for mines -Added Sjögren Inertia and Remington Mod. 11 shotguns -Walther M1918 and Winchester 1897 can now fire the next shot without releasing the trigger -Rebalanced Arisaka and Winchester Mod. 1873 and some other weapons -Changed RPG-43s model to another one, maybe that causes less bugs -Blown vehicles will no longer cause the hitmarker to appear when hit by a weapon -Fixed some glitches that were used to cheat grenade ammo -Fixed a desync with AT-grenades -Disabled sorting of the player list in admin panel because of annoying bugs -Fixed some map bugs -Fixed a bug that prevented MG emplacements from working when X rotation is below 0 / over 180 -Fixed "Overkill" perk not working correctly when selecting the secondary weapon -Fixed ammo pickup only giving ammo when a primary or secondary weapon is currently selected