1
0
mirror of synced 2024-11-12 02:00:50 +01:00

Revert assimp to previous version

This commit is contained in:
KillzXGaming 2020-02-28 16:49:18 -05:00
parent b1fb5b8b69
commit 284f727e9a
26 changed files with 697 additions and 36529 deletions

View File

@ -0,0 +1,146 @@
#version 330
//Samplers
uniform sampler2D tex;
uniform sampler2D bakeShadowMap;
uniform sampler2D bakeLightMap;
//Toggles
uniform int hasLightMap;
uniform int hasShadowMap;
uniform int hasNormalMap;
uniform vec4 highlight_color;
uniform float Saturation;
uniform float Hue;
uniform float Brightness;
uniform float ao_density;
uniform float shadow_density;
uniform int debugShading;
uniform float bake_shadow_type;
uniform float bake_light_type;
uniform vec3 gsys_bake_light_scale;
// Diffuse Channel Toggles
uniform int RedChannel;
uniform int GreenChannel;
uniform int BlueChannel;
uniform int AlphaChannel;
in vec2 f_texcoord0;
in vec2 f_texcoord1;
in vec2 f_texcoord2;
in vec3 fragPosition;
in vec3 probePosition;
in vec4 vertexColor;
in vec3 normal;
out vec4 fragOutput;
vec3 ApplySaturation(vec3 rgb, float adjustment)
{
const vec3 W = vec3(0.2125, 0.7154, 0.0721);
vec3 intensity = vec3(dot(rgb, W));
return mix(intensity, rgb, adjustment);
}
//https://gist.github.com/mairod/a75e7b44f68110e1576d77419d608786
vec3 hueShift( vec3 color, float hueAdjust ){
const vec3 kRGBToYPrime = vec3 (0.299, 0.587, 0.114);
const vec3 kRGBToI = vec3 (0.596, -0.275, -0.321);
const vec3 kRGBToQ = vec3 (0.212, -0.523, 0.311);
const vec3 kYIQToR = vec3 (1.0, 0.956, 0.621);
const vec3 kYIQToG = vec3 (1.0, -0.272, -0.647);
const vec3 kYIQToB = vec3 (1.0, -1.107, 1.704);
float YPrime = dot (color, kRGBToYPrime);
float I = dot (color, kRGBToI);
float Q = dot (color, kRGBToQ);
float hue = atan (Q, I);
float chroma = sqrt (I * I + Q * Q);
hue += hueAdjust;
Q = chroma * sin (hue);
I = chroma * cos (hue);
vec3 yIQ = vec3 (YPrime, I, Q);
return vec3( dot (yIQ, kYIQToR), dot (yIQ, kYIQToG), dot (yIQ, kYIQToB) );
}
float GetComponent(int Type, vec4 Texture)
{
switch (Type)
{
case 0: return Texture.r;
case 1: return Texture.g;
case 2: return Texture.b;
case 3: return Texture.a;
case 4: return 1.0;
case 5: return 0.0;
default: return 1.0;
}
}
void main(){
vec3 displayNormal = (normal.xyz * 0.5) + 0.5;
float hc_a = highlight_color.w;
vec4 diffuseMapColor = texture(tex,f_texcoord0);
vec4 albedo = vec4(0);
//Comp Selectors
albedo.r = GetComponent(RedChannel, diffuseMapColor);
albedo.g = GetComponent(GreenChannel, diffuseMapColor);
albedo.b = GetComponent(BlueChannel, diffuseMapColor);
albedo.a = GetComponent(AlphaChannel, diffuseMapColor);
vec4 color = vertexColor * albedo;
color.rgb = ApplySaturation(color.rgb, Saturation) * Brightness;
if (Hue > 0.0f)
color.rgb = hueShift(color.rgb, Hue);
float ShadowPass = 1;
float AoPass = 1;
vec3 LightingDiffuse = vec3(0);
if (hasShadowMap == 1)
{
float aoIntensity = texture(bakeShadowMap, f_texcoord1).r;
float shadowIntensity = texture(bakeShadowMap, f_texcoord1).g;
float aoBlend = 0;
aoBlend += 1.0 - aoIntensity;
float shadowBlend = 0;
shadowBlend += 1.0 - shadowIntensity;
ShadowPass *= 1.0 - shadowBlend * shadow_density * 0.5;
AoPass *= 1.0 - aoBlend * ao_density * 0.6;
}
if (hasLightMap == 1)
{
vec4 bakeMap1 = texture(bakeLightMap, f_texcoord2);
vec3 LightIntensity = vec3(0.1);
LightingDiffuse += (gsys_bake_light_scale * bakeMap1.rgb * bakeMap1.a) * LightIntensity;
}
color.rgb += LightingDiffuse;
color.rgb *= ShadowPass;
color.rgb *= AoPass;
float halfLambert = max(displayNormal.y,0.5);
vec4 colorComb = vec4(color.rgb * (1-hc_a) + highlight_color.rgb * hc_a, color.a);
fragOutput = vec4(colorComb.rgb * halfLambert, colorComb.a);
//gl_FragColor = vec4(color.a, color.a, color.a, 1);
}

View File

@ -0,0 +1,48 @@
#version 330
layout(location = 0) in vec4 position;
layout(location = 1) in vec3 vNormal;
layout(location = 2) in vec2 uv0;
layout(location = 3) in vec2 uv1;
layout(location = 4) in vec4 color;
in vec3 vProbePosition;
uniform mat4 mtxMdl;
uniform mat4 mtxCam;
uniform vec4 gsys_bake_st0;
uniform vec4 gsys_bake_st1;
out vec2 f_texcoord0;
out vec2 f_texcoord1;
out vec2 f_texcoord2;
out vec4 vertexColor;
out vec3 normal;
out vec3 probePosition;
out vec3 fragPosition;
void main(){
f_texcoord0 = uv0;
f_texcoord1 = uv1;
vertexColor = vec4(1,1,1,1);
normal = vNormal;
probePosition = vProbePosition;
fragPosition = vec3(position.xyz);
vec4 sampler2 = gsys_bake_st0;
vec4 sampler3 = gsys_bake_st1;
if (sampler2.x != 0 && sampler2.y != 0)
f_texcoord1 = vec2((uv1 * sampler2.xy) + sampler2.zw);
else
f_texcoord1 = vec2((uv1 * vec2(1)) + sampler2.zw);
if (sampler3.x != 0 && sampler3.y != 0)
f_texcoord2 = vec2((uv1 * sampler3.xy) + sampler3.zw);
else
f_texcoord2 = vec2((uv1 * vec2(1)) + sampler3.zw);
gl_Position = mtxCam*mtxMdl*position;
}

View File

@ -0,0 +1,203 @@
#version 330
uniform sampler2D tex;
uniform sampler2D normalMap;
uniform sampler2D bakeShadowMap;
uniform sampler2D bakeLightMap;
uniform sampler2D UVTestPattern;
uniform vec4 highlight_color;
uniform float Saturation;
uniform float Hue;
uniform float Brightness;
uniform int debugShading;
// Viewport Settings
uniform int uvChannel;
uniform int renderType;
uniform int useNormalMap;
uniform int renderVertColor;
uniform int useShadowMap;
in vec2 f_texcoord0;
in vec2 f_texcoord1;
in vec2 f_texcoord2;
in vec4 vertexColor;
in vec3 normal;
out vec4 fragColor;
#define gamma 2.2
vec2 displayTexCoord = f_texcoord0;
void main()
{
if (uvChannel == 1)
displayTexCoord = f_texcoord0;
if (uvChannel == 2)
displayTexCoord = f_texcoord2;
fragColor = vec4(vec3(0), 1);
vec3 N = normal;
if (HasNormalMap == 1 && useNormalMap == 1)
N = CalcBumpedNormal(normal, NormalMap, vert, uking_texture2_texcoord);
float metallic = 0;
float roughness = 1;
vec3 specIntensity = vec3(1);
float ao = 1;
if (HasMRA == 1) //Kirby Star Allies PBR map
{
//Note KSA has no way to tell if one gets unused or not because shaders :(
//Usually it's just metalness with roughness and works fine
metallic = texture(MRA, f_texcoord0).r;
roughness = texture(MRA, f_texcoord0).g;
ao = texture(MRA, f_texcoord0).b;
specIntensity = vec3(texture(MRA, f_texcoord0).a);
}
else if (useShadowMap == 1)
{
ao = texture(bakeShadowMap, f_texcoord1).r;
}
if (renderType == 1) // normals vertexColor
{
vec3 displayNormal = (N * 0.5) + 0.5;
fragColor = vec4(displayNormal,1);
}
else if (renderType == 2) // Lighting
{
vec3 I = vec3(0,0,-1) * mat3(mtxCam);
vec3 V = normalize(I); // view
float light = max(dot(N, V), 0.0);
fragColor = vec4(vec3(light), 1);
}
else if (renderType == 4) //Display Normal
{
if (uking_texture2_texcoord == 1)
fragColor.rgb = texture(normalMap, f_texcoord1).rgb;
else
fragColor.rgb = texture(normalMap, displayTexCoord).rgb;
}
else if (renderType == 3) //DiffuseColor
{
//Comp Selectors
vec4 diffuseMapColor = vec4(texture(DiffuseMap, displayTexCoord).rgb, 1);
diffuseMapColor.r = GetComponent(RedChannel, diffuseMapColor);
diffuseMapColor.g = GetComponent(GreenChannel, diffuseMapColor);
diffuseMapColor.b = GetComponent(BlueChannel, diffuseMapColor);
fragColor = vec4(diffuseMapColor.rgb, 1);
}
else if (renderType == 5) // vertexColor
fragColor = vertexColor;
else if (renderType == 6) //Display Ambient Occlusion
{
fragColor = vec4(vec3(ao), 1);
}
else if (renderType == 7) // uv coords
fragColor = vec4(displayTexCoord.x, displayTexCoord.y, 1, 1);
else if (renderType == 8) // uv test pattern
{
fragColor = vec4(texture(UVTestPattern, displayTexCoord).rgb, 1);
}
else if (renderType == 9) //Display tangents
{
vec3 displayTangent = (tangent * 0.5) + 0.5;
if (dot(tangent, vec3(1)) == 0)
displayTangent = vec3(0);
fragColor = vec4(displayTangent,1);
}
else if (renderType == 10) //Display bitangents
{
vec3 displayBitangent = (bitangent * 0.5) + 0.5;
if (dot(bitangent, vec3(1)) == 0)
displayBitangent = vec3(0);
fragColor = vec4(displayBitangent,1);
}
else if (renderType == 12)
{
fragColor.rgb = boneWeightsColored;
}
else if (renderType == 11) //Light map
{
if (HasLightMap == 1)
{
vec4 lightMap = texture(BakeLightMap, f_texcoord2);
fragColor = vec4(lightMap.rgb, 1);
}
else
{
fragColor = vec4(1);
}
}
else if (renderType == 13) //Specular
{
if (UseSpecularColor == 1)
fragColor = vec4(specIntensity.rgb, 1);
else
fragColor = vec4(vec3(specIntensity.r), 1);
}
else if (renderType == 14) //Shadow
{
if (HasShadowMap == 1)
{
float Shadow = texture(BakeShadowMap, f_texcoord1).g;
fragColor = vec4(vec3(Shadow), 1);
}
else
{
fragColor = vec4(1);
}
}
else if (renderType == 15) //MetalnessMap
{
fragColor = vec4(vec3(metallic), 1);
}
else if (renderType == 16) //RoughnessMap
{
fragColor = vec4(vec3(roughness), 1);
}
else if (renderType == 17) //SubSurfaceScatteringMap
{
if (HasSubSurfaceScatteringMap == 1)
{
vec3 sss = texture(SubSurfaceScatteringMap, displayTexCoord).rgb;
fragColor = vec4(sss, 1);
}
else
{
fragColor = vec4(1);
}
}
else if (renderType == 18) //EmmissionMap
{
if (HasEmissionMap == 1)
{
vec3 emm = texture(EmissionMap, displayTexCoord).rgb;
fragColor = vec4(emm, 1);
}
else
{
fragColor = vec4(1);
}
}
// Toggles rendering of individual color channels for all render modes.
fragColor.rgb *= vec3(renderR, renderG, renderB);
if (renderR == 1 && renderG == 0 && renderB == 0)
fragColor.rgb = fragColor.rrr;
else if (renderG == 1 && renderR == 0 && renderB == 0)
fragColor.rgb = fragColor.ggg;
else if (renderB == 1 && renderR == 0 && renderG == 0)
fragColor.rgb = fragColor.bbb;
}

View File

@ -0,0 +1 @@


View File

@ -0,0 +1,81 @@
#version 330 core
out vec4 FragColor;
in vec3 color;
in vec4 coefficent0;
in vec4 coefficent1;
in vec4 coefficent2;
in vec4 coefficent3;
in vec4 coefficent4;
in vec4 coefficent5;
in vec4 coefficent6;
vec3 CalculateIrradiance()
{
vec3 nor = vec3(1,1,1);
vec3 l00 = vec3(coefficent0.x, coefficent0.y, coefficent0.z);
vec3 l1m1 = vec3(coefficent0.w, coefficent1.x, coefficent1.y);
vec3 l10 = vec3(coefficent1.z, coefficent1.w, coefficent2.x);
vec3 l11 = vec3(coefficent2.y, coefficent2.z, coefficent2.w);
vec3 l2m2 = vec3(coefficent3.x, coefficent3.y, coefficent3.z);
vec3 l2m1 = vec3(coefficent3.w, coefficent4.x, coefficent4.y);
vec3 l20 = vec3(coefficent4.z, coefficent4.w, coefficent5.x);
vec3 l21 = vec3(coefficent5.y, coefficent5.z, coefficent5.w);
vec3 l22 = vec3(coefficent6.x, coefficent6.y, coefficent6.z);
const float c1 = 0.429043;
const float c2 = 0.511664;
const float c3 = 0.743125;
const float c4 = 0.886227;
const float c5 = 0.247708;
return (max(
(c1 * l22 * (nor.x * nor.x - nor.y * nor.y) +
c3 * l20 * nor.z * nor.z +
c4 * l00 -
c5 * l20 +
2.0 * c1 * l2m2 * nor.x * nor.y +
2.0 * c1 * l21 * nor.x * nor.z +
2.0 * c1 * l2m1 * nor.y * nor.z +
2.0 * c2 * l11 * nor.x +
2.0 * c2 * l1m1 * nor.y +
2.0 * c2 * l10 * nor.z), 0.0)
);
}
vec3 aglSH2Rgb( vec3 normal,
vec4 sh00,
vec4 sh01,
vec4 sh02,
vec4 sh10,
vec4 sh11,
vec4 sh12,
vec4 sh2 )
{
vec4 normal4 = vec4( normal.x, normal.y, normal.z, 1.0 );
vec3 x0;
x0.r = dot( sh00, normal4 );
x0.g = dot( sh01, normal4 );
x0.b = dot( sh02, normal4 );
vec4 v_b = normal4.xyzz * normal4.yzzx;
vec3 x1;
x1.r = dot( sh10, v_b );
x1.g = dot( sh11, v_b );
x1.b = dot( sh12, v_b );
float v_c = normal4.x * normal4.x - normal4.y * normal4.y;
vec3 x2 = sh2.rgb * v_c;
return max( ( x0 + x1 + x2 ), 0.0 );
}
void main()
{
vec3 irr = aglSH2Rgb(vec3(1,1,1),
coefficent0,coefficent1,coefficent2,
coefficent3,coefficent4,coefficent5,coefficent6);
// irr = CalculateIrradiance();
FragColor = vec4(irr, 1.0);
}

View File

@ -0,0 +1,36 @@
#version 330 core
in vec3 vProbePosition;
in vec4 vCoefficent0;
in vec4 vCoefficent1;
in vec4 vCoefficent2;
in vec4 vCoefficent3;
in vec4 vCoefficent4;
in vec4 vCoefficent5;
in vec4 vCoefficent6;
uniform mat4 mtxMdl;
uniform mat4 mtxCam;
out vec3 color;
out vec4 coefficent0;
out vec4 coefficent1;
out vec4 coefficent2;
out vec4 coefficent3;
out vec4 coefficent4;
out vec4 coefficent5;
out vec4 coefficent6;
void main()
{
gl_Position = mtxCam * mtxMdl * vec4(vProbePosition.xyz, 1);
color = vec3(1,1,1);
coefficent0 = vCoefficent0;
coefficent1 = vCoefficent1;
coefficent2 = vCoefficent2;
coefficent3 = vCoefficent3;
coefficent4 = vCoefficent4;
coefficent5 = vCoefficent5;
coefficent6 = vCoefficent6;
}

View File

@ -0,0 +1,89 @@
#version 330
layout(lines) in;
layout(line_strip, max_vertices = 119) out;
in vec4 color[];
in int gl_PrimitiveIDIn[];
out vec4 fragColor;
uniform mat4 mtxMdl;
uniform mat4 mtxCam;
uniform vec4 pathColor;
uniform int gapIndex;
uniform bool isPickingMode;
uniform float cubeScale;
uniform float controlCubeScale;
float cubeInstanceScale = cubeScale;
vec4 pos;
mat4 mtx = mtxCam*mtxMdl;
vec3 point = gl_in[0].gl_Position.xyz;
vec3 p0 = point;
vec3 p1 = gl_in[1].gl_Position.xyz;
vec4 points[8] = vec4[](
vec4(-1.0,-1.0,-1.0, 0.0),
vec4( 1.0,-1.0,-1.0, 0.0),
vec4(-1.0, 1.0,-1.0, 0.0),
vec4( 1.0, 1.0,-1.0, 0.0),
vec4(-1.0,-1.0, 1.0, 0.0),
vec4( 1.0,-1.0, 1.0, 0.0),
vec4(-1.0, 1.0, 1.0, 0.0),
vec4( 1.0, 1.0, 1.0, 0.0)
);
void face(int p1, int p2, int p4, int p3){
gl_Position = mtx * (pos + points[p1]*cubeInstanceScale); EmitVertex();
gl_Position = mtx * (pos + points[p2]*cubeInstanceScale); EmitVertex();
gl_Position = mtx * (pos + points[p3]*cubeInstanceScale); EmitVertex();
gl_Position = mtx * (pos + points[p4]*cubeInstanceScale); EmitVertex();
gl_Position = mtx * (pos + points[p1]*cubeInstanceScale); EmitVertex();
EndPrimitive();
}
void line(int p1, int p2){
gl_Position = mtx * (pos + points[p1]*cubeInstanceScale); EmitVertex();
gl_Position = mtx * (pos + points[p2]*cubeInstanceScale); EmitVertex();
EndPrimitive();
}
void main(){
if(!isPickingMode){
//draw Point
//outline
fragColor = color[0];
pos = vec4(point,1);
face(0,1,2,3);
face(4,5,6,7);
line(0,4);
line(1,5);
line(2,6);
line(3,7);
cubeInstanceScale = controlCubeScale;
}
//connection line (Point to Point)
if(gl_PrimitiveIDIn[0]!=gapIndex){
if(isPickingMode){
fragColor = pathColor;
gl_Position = mtx * vec4(p0, 1);
EmitVertex();
gl_Position = mtx * vec4(p1, 1);
EmitVertex();
}else{
fragColor = color[0];
gl_Position = mtx * vec4(p0, 1);
EmitVertex();
fragColor = color[1];
gl_Position = mtx * vec4(p1, 1);
EmitVertex();
}
EndPrimitive();
}
}

View File

@ -0,0 +1,65 @@
#version 330
layout(points) in;
layout(triangle_strip, max_vertices = 72) out;
in vec4 color[];
out vec4 fragColor;
uniform mat4 mtxMdl;
uniform mat4 mtxCam;
uniform vec4 pathColor;
uniform bool isPickingMode;
uniform float cubeScale;
uniform float controlCubeScale;
float cubeInstanceScale = cubeScale;
vec4 pos;
mat4 mtx = mtxCam*mtxMdl;
vec4 points[8] = vec4[](
vec4(-1.0,-1.0,-1.0, 0.0),
vec4( 1.0,-1.0,-1.0, 0.0),
vec4(-1.0, 1.0,-1.0, 0.0),
vec4( 1.0, 1.0,-1.0, 0.0),
vec4(-1.0,-1.0, 1.0, 0.0),
vec4( 1.0,-1.0, 1.0, 0.0),
vec4(-1.0, 1.0, 1.0, 0.0),
vec4( 1.0, 1.0, 1.0, 0.0)
);
void face(int p1, int p2, int p3, int p4){
gl_Position = mtx * (pos + points[p1]*cubeInstanceScale); EmitVertex();
gl_Position = mtx * (pos + points[p2]*cubeInstanceScale); EmitVertex();
gl_Position = mtx * (pos + points[p3]*cubeInstanceScale); EmitVertex();
gl_Position = mtx * (pos + points[p4]*cubeInstanceScale); EmitVertex();
EndPrimitive();
}
void faceInv(int p3, int p4, int p1, int p2){
gl_Position = mtx * (pos + points[p1]*cubeInstanceScale); EmitVertex();
gl_Position = mtx * (pos + points[p2]*cubeInstanceScale); EmitVertex();
gl_Position = mtx * (pos + points[p3]*cubeInstanceScale); EmitVertex();
gl_Position = mtx * (pos + points[p4]*cubeInstanceScale); EmitVertex();
EndPrimitive();
}
void main(){
//draw point
if(isPickingMode)
fragColor = color[0];
else
fragColor = pathColor*.125+color[0]*.125;
pos = gl_in[0].gl_Position;
faceInv(0,1,2,3);
face(4,5,6,7);
face(0,1,4,5);
faceInv(2,3,6,7);
faceInv(0,2,4,6);
face(1,3,5,7);
cubeInstanceScale = controlCubeScale;
}

View File

@ -50,8 +50,8 @@
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="AssimpNet, Version=5.0.0.0, Culture=neutral, PublicKeyToken=0d51b391f59f42a6, processorArchitecture=MSIL">
<HintPath>..\packages\AssimpNet.5.0.0-beta1\lib\net40\AssimpNet.dll</HintPath>
<Reference Include="AssimpNet, Version=4.1.0.0, Culture=neutral, PublicKeyToken=0d51b391f59f42a6, processorArchitecture=MSIL">
<HintPath>..\packages\AssimpNet.4.1.0\lib\net40\AssimpNet.dll</HintPath>
</Reference>
<Reference Include="DirectXTexNet, Version=1.0.0.3, Culture=neutral, PublicKeyToken=67e4f5ed452a4f5d, processorArchitecture=MSIL">
<HintPath>..\packages\DirectXTexNet.1.0.0-rc3\lib\net40\DirectXTexNet.dll</HintPath>
@ -292,12 +292,33 @@
<None Include="Shader\Legacy\KCL.vert">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Shader\LevelEditor\BfresBasic.frag">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Shader\LevelEditor\BfresBasic.vert">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Shader\LevelEditor\BfresDebug.frag">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Shader\LevelEditor\ProbeSphere.frag">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Shader\LevelEditor\ProbeSphere.vert">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Shader\MKAGPDX\MKAGPDX_Model.frag">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Shader\MKAGPDX\MKAGPDX_Model.vert">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Shader\Path\LineShader2.geom">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Shader\Path\TriangleShader2.geom">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Shader\PBR\brdf.frag">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
@ -571,6 +592,9 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Projects\Recent\DUMMY.txt" />
<None Include="Shader\LevelEditor\LightingGraphics.frag">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<Content Include="x64\libzstd.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
@ -611,8 +635,8 @@
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\DirectXTexNet.1.0.0-rc3\build\DirectXTexNet.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\DirectXTexNet.1.0.0-rc3\build\DirectXTexNet.targets'))" />
<Error Condition="!Exists('..\packages\AssimpNet.5.0.0-beta1\build\AssimpNet.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\AssimpNet.5.0.0-beta1\build\AssimpNet.targets'))" />
<Error Condition="!Exists('..\packages\AssimpNet.4.1.0\build\AssimpNet.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\AssimpNet.4.1.0\build\AssimpNet.targets'))" />
</Target>
<Import Project="..\packages\DirectXTexNet.1.0.0-rc3\build\DirectXTexNet.targets" Condition="Exists('..\packages\DirectXTexNet.1.0.0-rc3\build\DirectXTexNet.targets')" />
<Import Project="..\packages\AssimpNet.5.0.0-beta1\build\AssimpNet.targets" Condition="Exists('..\packages\AssimpNet.5.0.0-beta1\build\AssimpNet.targets')" />
<Import Project="..\packages\AssimpNet.4.1.0\build\AssimpNet.targets" Condition="Exists('..\packages\AssimpNet.4.1.0\build\AssimpNet.targets')" />
</Project>

View File

@ -1,209 +0,0 @@
----------------------------------------------------------------------
CHANGELOG
----------------------------------------------------------------------
4.1.0 (10-28-2018)
- Updated to target .Net Standard 1.3 (additional .Net 3.5 and .Net 4 targets)
- Removed old IL patcher to use new MemoryInterop.ILPatcher build time dependency (allows us to build cross-platform)
- Rewrote Sample application to be a .Net Core app that uses the Veldrid low-level graphics library for rendering
- Added x64 linux native binary, x64 macOS native binary
- Tested on Ubuntu 18.04 and MacOS 10.13 (High Sierra)
- Several fixes and updates to target latest Assimp release
- Ported over "UnmanagedLibrary" abstract code and refactored AssimpLibrary
- Added "ThrowOnLoadFailure" to configure getting back a "false" if native library fails to load or throw an exception (the default). Mono should no longer
throw a "NotImplemented" exception because of trying to get the error code from windows.
- !!Breaking Change!! Native DLLs are deployed differently and resolved at runtime differently
- Removed "DefaultLibraryPathXXBit" properties from AssimpLibrary, they are meaningless now (and probably not used)
- Introduced "UnmanagedLibraryResolver" that lets you set the following to completely configure native DLL loading:
1. Multiple probing paths
2. Multiple fallback library names (e.g. versioned binaries)
3. Override name if the default native library name is not good enough for your tastes.
- Search order of the native DLL is as follows:
1. Search user-specified probing paths
2. Search {AppBaseDirectory}/runtimes/{RID}/native/
3. Search {AppBaseDirectory}/
4. Search nuget cache based on assembly name/informational version ({UserProfile}/.nuget/packages/AssimpNet/{PackageVersion}/runtimes/{RID}/native/)
5. If all above failed, return the given name of the DLL (or override name) and let the OS try and find it (different OS' may have different strategies).
- The resolver is only used in AssimpLibrary.LoadLibrary(). The other two overloads still take in a user-supplied path/to/your/DLL.
- Native DLLs are now deployed in the "runtimes" folder of the nuget package. This means they are now picked up as dependencies by netcore (*.deps.json)
and automatically get copied during the "dotnet publish" command. During development, the system will try and locate the native DLLs in the nuget cache
(.net framework 3.5/4.0 targets still use the MSBuild targets file to copy the runtime folder to the output folder). The folder structure looks like this:
- runtimes/win-x64/native/assimp.dll
- runtimes/win-x86/native/assimp.dll
- runtimes/osx-x64/native/libassimp.dylib
- runtimes/linux-x64/native/libassimp.so
- All native binaries are named "assimp" or "libassimp" depending on platform, since we're putting them in "well known" architecture folders, no need to have unique names
- [Source Only] Added a Unity script that will make it easier for users to load the native DLLs when running in Editor/Standalone Unity 3D
- Build outputs a folder called "UnityPlugin" which you can drag and drop into the Unity Editor. A package will be available in the Asset Store as well.
Targets Assimp 4.1.0
======================================================================
3.3.2 (12-26-2016)
- Fixed up nuget package build targets.
- Added donated mac library implementation (haven't personally tested)
- Removed null/empty string checks for import format hint for reading streams - if you don't supply
a hint, Assimp will automatically try to detect what format it is
- Added logging when an invalid export format ID is encountered -- be sure to use "collada" and not "dae".
- Added additional null/empty checks if adding a material property with an invalid fully qualified name.
Targets Assimp 3.1.1
======================================================================
3.3 (07-3-2014)
- Upgraded to Assimp 3.1.1 - now with FBX support!
- Added matrix property configuration type
- Added root node transformation property configuration for use with "PreTransformVertices" post process step
- Added collada "ignore up direction" property configuration
- Added various FBX importer property configurations
- Added global property configuration to disable bone visualization when a model only has animations and no geometry
- Added support for Metadata objects on nodes
- Fixed issue with marshaling mesh names, AiMesh and AiAnimMesh are now blittable. All unmanaged structs are blittable
and .NET runtime marshaling is avoided due to issues with marshaling fixed buffers in non-blittable structures.
Happy Fourth Of July!
Targets Assimp 3.1.1
======================================================================
3.2 (03-14-2013)
- Added IOSystem/IOStream support, allowing for custom IO handling. An IOSystem can be registered to an AssimpImporter,
which is used during ImportFile and ConvertFile APIs. It currently is not supported for ImportFileFromStream APIs.
- Fixed marshalling of String material property values
- Fixed aiGetTexture function signature to take in an array of 2 UV wrapmodes
Targets Assimp 3.0.1270
======================================================================
3.1 (01-01-2013)
- Added AnyCPU support, replaced AssimpMethods with AssimpLibrary that dynamically loads/unloads the unmanaged Assimp DLL
optionally, a custom file path can be specified to load the Assimp DLL. By default, the 32 or 64 bit Assimp DLL is loaded from the
same directory that the AssimpNet DLL is located in, depending on the bitness of the process.
- Added missing properties for PreState/PostState in NodeAnimationChannel
Targets Assimp 3.0.1270
======================================================================
3.0 (11-11-2012)
- Upgraded to Assimp3.0
- Added Convert API to AssimpImporter to utilize new Export functionality
- Several fixes to Matrix-Quaternion structures
Targets Assimp 3.0.1270
======================================================================
2.1.2.1 Refresh (7-27-2012)
- Added root transformations to the importer - can specify Scale, XRotation, YRotation, and ZRotation. Can use these properties to bake the
transformation by specifying the "PreTransformVertices" post process flag.
- Added missing OffsetMatrix property to Bone
Targets Assimp 2.0.854
======================================================================
2.1.2 (4-4-2012)
- Added RemoveConfigs() method to AssimpImporter
- Fixed an occassional crash when mashalling string material properties
Targets Assimp 2.0.854
======================================================================
2.1 (1-28-2012)
- Added Matrix3x3, Matrix4x4 methods.
- Fixed several bugs in Quaternion.
- Added unit tests for Matrix3x3, Matrix4x4, Quaternion.
- Added "ImportFileFromStream" AssimpMethod and equivalent methods to the AssimpImporter:
This is the implementation for "aiImportFileFromMemory".
- Added a "ReadStreamFully" method to MemoryHelper.
- Added "Importer Settings" config classes.
- Added a sample a port of Assimp's simple textured OpenGL sample using OpenTK.
Targets Assimp 2.0.854
======================================================================
2.0 (1-22-2012)
- Initial release, core API is finished.
Targets Assimp 2.0.854

View File

@ -1,70 +0,0 @@
Copyright (c) 2012-2020 AssimpNet - Nicholas Woodfield
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
====================================================================================
Open Asset Import Library (Assimp)
Copyright (c) 2006-2018, Assimp Development Team
All rights reserved.
Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the
following conditions are met:
* Redistributions of source code must retain the above
copyright notice, this list of conditions and the
following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the
following disclaimer in the documentation and/or other
materials provided with the distribution.
* Neither the name of the ASSIMP team, nor the names of its
contributors may be used to endorse or promote products
derived from this software without specific prior
written permission of the ASSIMP Development Team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
AN EXCEPTION applies to all files in the ./test/models-nonbsd subfolder.
These are 3d models for testing purposes, from various free sources
on the internet. They are - unless otherwise stated - copyright of
their respective creators, which may impose additional requirements
on the use of their work. For any of these models, see
<model-name>.source.txt for more legal information. Contact us if you
are a copyright holder and believe that we credited you inproperly or
if you don't want your files to appear in the repository.

View File

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Copy/clean native dependencies only for projects that don't output a *.deps.json file (netframework projects). Netcore projects will
copy out the native dependencies during publish, and during development debugging/running, the binaries will be loaded from the nuget cache.
Optionally, the property $(ForceCopyNativeAssimp) can be set to true to always run these targets. -->
<Target Name="CopyNativeAssimp" AfterTargets="AfterBuild" Condition="'$(ForceCopyNativeAssimp)' == 'true' OR !Exists('$(TargetDir)$(AssemblyName).deps.json')">
<ItemGroup>
<NativeAssimpLibs Include="$(MSBuildThisFileDirectory)..\runtimes\**\*.*"/>
</ItemGroup>
<Message Text="Copying native Assimp libraries..." Importance="high" />
<Message Text="$(TargetDir)$(AssemblyName).deps.json" Importance="high" />
<Copy SourceFiles="@(NativeAssimpLibs)" DestinationFolder="$(OutputPath)\runtimes\%(RecursiveDir)" />
</Target>
<Target Name="CleanNativeAssimp" BeforeTargets="BeforeClean" Condition="'$(ForceCopyNativeAssimp)' == 'true' OR !Exists('$(TargetDir)$(AssemblyName).deps.json')">
<Message Text="Cleaning native Assimp libraries..." Importance="high" />
<ItemGroup>
<NativeAssimpLibsToDelete Include="$(TargetDir)runtimes\**\*assimp*.*;" />
</ItemGroup>
<Delete Files="@(NativeAssimpLibsToDelete)" />
</Target>
</Project>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB