-- Apply D3D10 settings function ApplyD3D10Settings() SetResourceKbps(D3D10Config.renderScale * 1000) SetTextureFiltering(D3D10Config.textureFiltering)
return oPresent(pSwapChain, SyncInterval, Flags); } d3d10 fivem
-- Particle system with D3D10 compute shaders function CreateParticleSystem(particleCount) local system = { count = particleCount, positions = {}, velocities = {}, life = {} } positions = {}
float4 PS_Bloom(float4 screenPos : SV_POSITION, float2 texCoord : TEXCOORD) : SV_Target { float4 original = SceneTexture.Sample(LinearSampler, texCoord); float4 bloom = 0; velocities = {}
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
void HookD3D10() { ID3D10Device* pDevice = nullptr; // Hook VTable present function MH_Initialize(); MH_CreateHook((LPVOID*)oPresent, hkPresent, (LPVOID*)&oPresent); MH_EnableHook(MH_ALL_HOOKS); } -- client/d3d10_features.lua local d3d10 = {} -- Screen-space quad rendering function d3d10.DrawQuad(x, y, w, h, color) -- Native D3D10 quad via NUI or native calls DrawRect(x + w/2, y + h/2, w, h, color.r, color.g, color.b, color.a) end