Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOSetTargets NULL offsets #353

Open
leotorrez opened this issue Dec 3, 2024 · 0 comments
Open

SOSetTargets NULL offsets #353

leotorrez opened this issue Dec 3, 2024 · 0 comments

Comments

@leotorrez
Copy link

at:
https://github.com/bo3b/3Dmigoto/blob/722abdd52eaa969fa52dd5e0a099160e4863e863/DirectX11/CommandList.cpp#L6046C1-L6063C9

The comments seem to suggest a very untested approach to setting the offsets. According to the documentation: https://learn.microsoft.com/en-us/windows/win32/api/d3d11/nf-d3d11-id3d11devicecontext-sosettargets it seems like setting the offset to -1 instead of NULL might achieve a somewhat dynamic solution for this issue.

On top of this observation I've been facing the following trouble. In Unity games where the posing is done and then its result passed to a stream output into the drawing stages, we have the issue that the memory allocation is not sufficient to store all the information needed ending up with broken models. The issue has been fixed with a custom version of 3dmigoto that artifically raises the vertex limit to a set number or one defined by the user.

I was wondering if by properly handling this stream output and re-defining its byte_width we could achieve this same effect without the need for these custom editions of 3dmigoto.

after countless game crashes I managed to get this to properly render the full model however only for a single frame. It immediately crashed afterwards. Any guidance or suggestion on the subject could be helpful

[TextureOverridedoorBlend]
hash = 668569d6
if DRAW_TYPE == 1
	handling = skip
	so0 = ref ResourceAAA
	vb0 = ResourcedoorPosition.0
	vb1 = ResourcedoorBlend.0
	vs-t10 = ResourcePose
	x140 = $vg_count
	x141 = $frame
	run = CustomShaderPose
	ResourceEEEE = ref so0
endif

[ResourceEEEE]
type = Buffer
stride = 40
byte_width = 1387200
bind_flags =  VERTEX_BUFFER 
usage = DEFAULT

[ResourceAAA]
type = Buffer
stride = 40
byte_width = 1387200
bind_flags = STREAM_OUTPUT VERTEX_BUFFER SHADER_RESOURCE
usage = DEFAULT

[TextureOverridedoorBody]
hash = 485ee530
match_first_index = 3978
vb0 = ResourceEEEE
ib = ResourcedoorBodyIB.0
ps-t0 = ResourcedoorBodyDiffuse.0
ps-t1 = ResourcedoorBodyLightMap.0
ps-t2 = ResourcedoorBodyShadow.0
ps-t3 = ResourcedoorBodyt3.0

[TextureOverridedoorIB]
hash = 485ee530
handling = skip
drawindexed = auto

[TextureOverridedoorHead]
hash = 485ee530
match_first_index = 0
ib = null

[TextureOverridedoorTexcoord]
hash = 10357d11
vb1 = ResourcedoorTexcoord.0

[TextureOverridedoor]
hash = 3b595e58

[CustomShaderPose]
vs = CustomPose.hlsl
draw = 43507,0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant