Repository navigation
feat: add rendering bindings - #75
Draft
northaxosky wants to merge 9 commits into
Draft
northaxosky wants to merge 9 commits into
northaxosky wants to merge 9 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rendering bindings from our fork, everything here is used by Community Shaders (a few bits by Addictol too). I went through all of it against the AE exe in IDA. Anything I couldn't verify and nothing reads is a pad instead of a guessed name.
What's in it
BSGraphics: render state, render targets, z-prepass and draw functions,RendererShadowStateas real membersBSShadercommand buffers,BSRenderPass,BSImagespaceShader,BSComputeShader, and the small derived shaders with correct AE sizesBSLight, theBSShadow*Lightfamily,ShadowSceneNode,BSDFTiledLighting,NiLightSky,Clouds,Precipitation,NVGodrays,TESWaterSystem, terrain chunks/nodes,DrawWorldBSMeshLODTriShape,BSMergeInstancedTriShape,BSGeometrySegmentData,BSGeometryListCullingProcessFixes to existing code (separate commits)
ImageSpaceManagereffect indices are off by one from 80 onward on AE, there's anISCopyNormalseffect at 80. Checked a bunch of indices across the range, not just the ends.Main::GetLandLODRoot/GetObjectLODRootreturned the address of the global instead of the node.Question for you
28 of the IDs don't have wrappers on purpose. Mods use them as hook targets or to find a call site inside them, not as something you'd call:
Main::Run,OnIdle,DrawGamePause,DrawWorld_And_UI,RunCameraPath,DrawWorld::Begin,Render_PreUI,BSShaderUtil::AccumulateScene,TESObjectREFR::SetSequencePosition,BSGraphics::CreateD3DAndSwapChainBSUtilityShader::SetupTechnique,BSDFLightShader::SetupGeometry,BSImagespaceShader::Render/Dispatch,BSCubeMapCamera::ClickCubeMap,BSShader::LoadBSCullingGroup::Add,ScreenShot::TakeScreenShot,BSShaderRenderTargets::Create,BSImagespaceShaderLensFlare::RenderLensFlare,BGSBtrDB::WaterRegistrationSunposition/alpha globals, a tiled lighting lambda, the D3D11 import stub, andNiAVObject::Update(you already have your ownUpdate)You ok with those staying as plain IDs? If you'd rather not carry hook-only IDs I can pull them out and keep them on our side.
Builds in debug on msvc and clang-cl.