View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000144 | Gorilla3D | Feature Request | public | 2021-03-08 16:20 | 2021-03-09 14:18 |
Reporter | administrator | Assigned To | administrator | ||
Priority | normal | Severity | feature | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 0.8.3.x | ||||
Target Version | 0.8.3.x | Fixed in Version | 0.8.3.x | ||
Summary | 0000144: TGorillaLayer3D with the ability of lighting and shading instead of a simple TTextureMaterial | ||||
Description | Adopt demo changes made for a customer to allow lighting and shading on a Layer3D. In the demo we modified the TCustomBufferLayer3D.Render (see below) to setup a TLightMaterial while rendering and setting normals for correct shading. | ||||
Additional Information | procedure TCustomBufferLayer3D.Render; var Ver: TVertexBuffer; Idx: TIndexBuffer; Mat: TLightMaterial; begin if not FBuffer.IsEmpty then begin Ver := TVertexBuffer.Create([TVertexFormat.Vertex, TVertexFormat.Normal, TVertexFormat.TexCoord0], 4); Ver.Vertices[0] := TPoint3D.Zero; Ver.Vertices[1] := TPoint3D.Create(Width, 0, 0); Ver.Vertices[2] := TPoint3D.Create(Width, Height, 0); Ver.Vertices[3] := TPoint3D.Create(0, Height, 0); Ver.TexCoord0[0] := TPointF.Zero; Ver.TexCoord0[1] := TPointF.Create(1, 0); Ver.TexCoord0[2] := TPointF.Create(1, 1); Ver.TexCoord0[3] := TPointF.Create(0, 1); Ver.Normals[0] := TPoint3D.Create(0, 0, -1); Ver.Normals[1] := TPoint3D.Create(0, 0, -1); Ver.Normals[2] := TPoint3D.Create(0, 0, -1); Ver.Normals[3] := TPoint3D.Create(0, 0, -1); Idx := TIndexBuffer.Create(6); Idx[0] := 0; Idx[1] := 1; Idx[2] := 3; Idx[3] := 3; Idx[4] := 1; Idx[5] := 2; Mat := TLightMaterial.Create; Mat.Texture := TTextureBitmap(FBuffer).Texture; Context.DrawTriangles(Ver, Idx, Mat, AbsoluteOpacity); Mat.Free; Ver.Free; Idx.Free; end; end; | ||||
Tags | No tags attached. | ||||
Delphi-Version | 10.4.1 | ||||
OpenGLVersion | OpenGL 4.3 | ||||
|
fixed GorillaLayer3D now provides a "Shading" property to set: flat, lambert, phong, blinn-phong shading Normals added to plane |
Date Modified | Username | Field | Change |
---|---|---|---|
2021-03-08 16:20 | administrator | New Issue | |
2021-03-08 16:20 | administrator | Status | new => assigned |
2021-03-08 16:20 | administrator | Assigned To | => administrator |
2021-03-09 14:18 | administrator | Status | assigned => resolved |
2021-03-09 14:18 | administrator | Resolution | open => fixed |
2021-03-09 14:18 | administrator | Fixed in Version | => 0.8.3.x |
2021-03-09 14:18 | administrator | Note Added: 0000161 |