Closed CarlLee closed 9 years ago
Posting an example
SubProgram "d3d11 " {
Bind "vertex" Vertex
Bind "color" Color
Bind "texcoord" TexCoord0
Bind "texcoord1" TexCoord1
ConstBuffer "$Globals" 160
Vector 16 [_LightColor0]
Float 48 [_ScrollX1]
Float 52 [_ScrollY1]
Float 56 [_Scale1]
Float 88 [_ScrollX2]
Float 92 [_ScrollY2]
Float 96 [_Scale2]
Float 132 [_LightingBlend]
Vector 144 [_MainTex_ST]
ConstBuffer "UnityPerCamera" 128
Vector 0 [_Time]
ConstBuffer "UnityPerDraw" 336
Matrix 0 [glstate_matrix_mvp]
ConstBuffer "UnityPerFrame" 208
Vector 64 [glstate_lightmodel_ambient]
BindCB "$Globals" 0
BindCB "UnityPerCamera" 1
BindCB "UnityPerDraw" 2
BindCB "UnityPerFrame" 3
"vs_4_0
eefiecedeboielkhenkkkkcdkdpkhpbaeaknncpoabaaaaaafaaeaaaaadaaaaaa
cmaaaaaaleaaaaaahaabaaaaejfdeheoiaaaaaaaaeaaaaaaaiaaaaaagiaaaaaa
aaaaaaaaaaaaaaaaadaaaaaaaaaaaaaaapapaaaahbaaaaaaaaaaaaaaaaaaaaaa
adaaaaaaabaaaaaaadadaaaahbaaaaaaabaaaaaaaaaaaaaaadaaaaaaacaaaaaa
adadaaaahkaaaaaaaaaaaaaaaaaaaaaaadaaaaaaadaaaaaaapapaaaafaepfdej
feejepeoaafeeffiedepepfceeaaedepemepfcaaepfdeheoleaaaaaaagaaaaaa
aiaaaaaajiaaaaaaaaaaaaaaabaaaaaaadaaaaaaaaaaaaaaapaaaaaakeaaaaaa
aaaaaaaaaaaaaaaaadaaaaaaabaaaaaaadamaaaakeaaaaaaabaaaaaaaaaaaaaa
adaaaaaaabaaaaaaamadaaaakeaaaaaaacaaaaaaaaaaaaaaadaaaaaaacaaaaaa
adamaaaakeaaaaaaadaaaaaaaaaaaaaaadaaaaaaacaaaaaaamadaaaaknaaaaaa
aaaaaaaaaaaaaaaaadaaaaaaadaaaaaaapaaaaaafdfgfpfagphdgjhegjgpgoaa
feeffiedepepfceeaaedepemepfcaaklfdeieefcniacaaaaeaaaabaalgaaaaaa
fjaaaaaeegiocaaaaaaaaaaaakaaaaaafjaaaaaeegiocaaaabaaaaaaabaaaaaa
fjaaaaaeegiocaaaacaaaaaaaeaaaaaafjaaaaaeegiocaaaadaaaaaaafaaaaaa
fpaaaaadpcbabaaaaaaaaaaafpaaaaaddcbabaaaabaaaaaafpaaaaaddcbabaaa
acaaaaaafpaaaaadpcbabaaaadaaaaaaghaaaaaepccabaaaaaaaaaaaabaaaaaa
gfaaaaaddccabaaaabaaaaaagfaaaaadmccabaaaabaaaaaagfaaaaaddccabaaa
acaaaaaagfaaaaadmccabaaaacaaaaaagfaaaaadpccabaaaadaaaaaagiaaaaac
abaaaaaadiaaaaaipcaabaaaaaaaaaaafgbfbaaaaaaaaaaaegiocaaaacaaaaaa
abaaaaaadcaaaaakpcaabaaaaaaaaaaaegiocaaaacaaaaaaaaaaaaaaagbabaaa
aaaaaaaaegaobaaaaaaaaaaadcaaaaakpcaabaaaaaaaaaaaegiocaaaacaaaaaa
acaaaaaakgbkbaaaaaaaaaaaegaobaaaaaaaaaaadcaaaaakpccabaaaaaaaaaaa
egiocaaaacaaaaaaadaaaaaapgbpbaaaaaaaaaaaegaobaaaaaaaaaaadcaaaaal
dcaabaaaaaaaaaaaegiacaaaaaaaaaaaadaaaaaaagiacaaaabaaaaaaaaaaaaaa
egbabaaaabaaaaaadiaaaaaimccabaaaabaaaaaaagaebaaaaaaaaaaakgikcaaa
aaaaaaaaadaaaaaadcaaaaaldccabaaaabaaaaaaegbabaaaabaaaaaaegiacaaa
aaaaaaaaajaaaaaaogikcaaaaaaaaaaaajaaaaaadcaaaaaldcaabaaaaaaaaaaa
ogikcaaaaaaaaaaaafaaaaaaagiacaaaabaaaaaaaaaaaaaaegbabaaaabaaaaaa
diaaaaaidccabaaaacaaaaaaegaabaaaaaaaaaaaagiacaaaaaaaaaaaagaaaaaa
dcaaaaalmccabaaaacaaaaaaagbebaaaacaaaaaaagiecaaaaaaaaaaaajaaaaaa
kgiocaaaaaaaaaaaajaaaaaadcaaaaaopcaabaaaaaaaaaaaegiocaaaadaaaaaa
aeaaaaaaaceaaaaaaaaaaaeaaaaaaaeaaaaaaaeaaaaaaaeaegiocaaaaaaaaaaa
abaaaaaaaaaaaaaipcaabaaaaaaaaaaaegaobaaaaaaaaaaaegbobaiaebaaaaaa
adaaaaaadcaaaaakpccabaaaadaaaaaafgifcaaaaaaaaaaaaiaaaaaaegaobaaa
aaaaaaaaegbobaaaadaaaaaadoaaaaab"
}
Which file is that specifically? I'm doing the same and am finding quickbms to do a better job with that sort of thing.
This was extracted from premiummatieral1.unity3d, it's called Card_UnlitScroll_2LayerDistortion_Premium.shader and there're a lot of shaders that's actually used by golden cards in shared0, shared1, shared2, too.
And the frame of normal card can be found in gameobject1.
I already figured out every file I need to recreate cards. I only need to know how to create hollow fonts like in the game and how to use those shaders. There're information about which card uses which shaders in cards0, cards1, cards2.
BTW, what bms script are you using? The script I found on Internet doesn't work
I'm not aware that it's possible to reverse shaders into more than this compiled text form. The Unity editor can load them directly from asset files, but this requires additional runtime type information that is not present in Heartstone's data files, as far as I know.
So this means it's not possible to use these shaders?
As test result, some of these shaders don't work properly after extraction even if exact same parameters are set.
Some parameters are missing in the script. I suppose those parameters are used in the compiled section of the script.
Hard to say, I haven't tried to re-use shader from compiled games in own projects yet. I guess the shaders requires a custom asset format (.shader?) that contain the required metadata in binary form, which can be loaded in the editor.
I'll close this issue for now, I'll reopen it once I found anything interesting that helps solve this problem.
I'm doing research on recreating golden cards from Hearthstone. I extracted some of the shaders Blizzard used to draw those cards, but it's in assembly, and there're some parts in random string, probably a type error.
Is there a way to use those shaders?