Skip to main content

D3d10 Fivem -

if startScreen and endScreen then -- Direct D3D10 line drawing DrawLine(startScreen.x, startScreen.y, endScreen.x, endScreen.y, color.r, color.g, color.b, color.a) end end

// Simple gaussian blur sampling for (int x = -2; x <= 2; x++) { for (int y = -2; y <= 2; y++) { float2 offset = float2(x, y) * bloomRadius / 1920.0; bloom += SceneTexture.Sample(LinearSampler, texCoord + offset); } } bloom /= 25.0;

ResetRenderTarget()

if (pDevice) { // Draw custom primitives, shaders, etc. pDevice->Release(); }

return oPresent(pSwapChain, SyncInterval, Flags); } d3d10 fivem

RegisterCommand("-bloom", function() SetSeethrough(false) Citizen.InvokeNative(0xBE3F7F0B, false) end, false) end)

1. Basic D3D10 Hook Setup (Native C++ for FiveM) // d3d10_hook.cpp #include <d3d10.h> #include <d3d10_1.h> typedef HRESULT(WINAPI* Present)(IDXGISwapChain*, UINT, UINT); Present oPresent = nullptr; if startScreen and endScreen then -- Direct D3D10

-- Render to texture function d3d10.CreateRenderTarget(width, height) local rt = { width = width, height = height, texture = CreateRuntimeTexture(width, height) } return rt end